Class LoadSpreadSheetDialog

    • Field Detail

      • m_ButtonReload

        protected BaseButton m_ButtonReload
        the button for reloading an existing file.
      • m_TableData

        protected SpreadSheetTable m_TableData
        the table for displaying the instances.
      • m_ButtonLoad

        protected BaseButton m_ButtonLoad
        the Load button.
      • m_ButtonClose

        protected BaseButton m_ButtonClose
        the Close button.
      • m_SearchPanel

        protected SearchPanel m_SearchPanel
        the search panel.
      • m_ComboBoxSorting

        protected BaseComboBox m_ComboBoxSorting
        the sorting index.
      • m_ComboBoxSortingModel

        protected DefaultComboBoxModel m_ComboBoxSortingModel
        the soriting index model.
      • m_ComboBoxID

        protected BaseComboBox m_ComboBoxID
        the ID index.
      • m_ListAdditionalAttributes

        protected JList m_ListAdditionalAttributes
        the list of additional attribute values to store in the report.
      • m_ListAdditionalAttributesModel

        protected DefaultListModel m_ListAdditionalAttributesModel
        the model for the additional attributes.
      • m_TextAttributeRange

        protected BaseTextField m_TextAttributeRange
        the text field for the attribute range.
      • m_DefaultAttributeRange

        protected Range m_DefaultAttributeRange
        the default range.
      • m_Sheet

        protected SpreadSheet m_Sheet
        the full dataset.
      • m_Indices

        protected int[] m_Indices
        the selected indices.
      • m_TabbedPane

        protected BaseTabbedPane m_TabbedPane
        the tabbed pane.
      • m_DefaultClassIndex

        protected Index m_DefaultClassIndex
        the default class index.
      • m_DefaultIDIndex

        protected Index m_DefaultIDIndex
        the default ID index.
      • m_DefaultSortIndex

        protected Index m_DefaultSortIndex
        the default sort index.
      • m_AcceptListener

        protected ChangeListener m_AcceptListener
        the listener waiting for the user to accept the input.
      • m_CancelListener

        protected ChangeListener m_CancelListener
        the listener waiting for the user to cancel the dialog.
    • Constructor Detail

      • LoadSpreadSheetDialog

        public LoadSpreadSheetDialog​(Dialog owner)
        Creates a modal dialog.
        Parameters:
        owner - the owning dialog
      • LoadSpreadSheetDialog

        public LoadSpreadSheetDialog​(Dialog owner,
                                     String title)
        Creates a modal dialog.
        Parameters:
        owner - the owning dialog
        title - the title of the dialog
      • LoadSpreadSheetDialog

        public LoadSpreadSheetDialog​(Frame owner)
        Creates a modal dialog.
        Parameters:
        owner - the owning frame
      • LoadSpreadSheetDialog

        public LoadSpreadSheetDialog​(Frame owner,
                                     String title)
        Creates a modal dialog.
        Parameters:
        owner - the owning frame
        title - the title of the dialog
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class BaseDialog
      • initGUI

        protected void initGUI()
        Initializes the GUI elements.
        Overrides:
        initGUI in class BaseDialog
      • getAdditionalAttributes

        public int[] getAdditionalAttributes()
        Returns the attributes indices of the original dataset to include in the reports.
        Returns:
        the indices of the attributes
      • setDefaultAttributeRange

        public void setDefaultAttributeRange​(String value)
        Sets the default range of attributes to use.
        Parameters:
        value - the range
      • getDefaultAttributeRange

        public String getDefaultAttributeRange()
        Returns the default range of attributes to use.
        Returns:
        the range of attributes to use
      • getCurrentAttributeRange

        public Range getCurrentAttributeRange()
        Returns the current range of attributes to use.
        Returns:
        the range of attributes to use
      • setDefaultIDIndex

        public void setDefaultIDIndex​(String value)
        Sets the default ID index to use.
        Parameters:
        value - the ID index, 1-based integer or 'first'/'last', use empty string for none
        See Also:
        Index
      • getDefaultIDIndex

        public String getDefaultIDIndex()
        Returns the default ID index in use.
        Returns:
        the ID index, 1-based integer or 'first'/'last', empty string for none
        See Also:
        Index
      • getCurrentIDIndex

        public int getCurrentIDIndex()
        Returns the currently selected ID index.
        Returns:
        the ID index, -1 if none selected
      • setDefaultSortIndex

        public void setDefaultSortIndex​(String value)
        Sets the default sort index to use.
        Parameters:
        value - the sort index, 1-based integer or 'first'/'last', use empty string for none
        See Also:
        Index
      • getDefaultSortIndex

        public String getDefaultSortIndex()
        Returns the default sort index in use.
        Returns:
        the sort index, 1-based integer or 'first'/'last', empty string for none
        See Also:
        Index
      • getCurrentSortIndex

        public int getCurrentSortIndex()
        Returns the currently selected sort index.
        Returns:
        the sort index, -1 if none selected
      • getSpreadSheet

        public SpreadSheet getSpreadSheet()
        Returns the full spreadsheet, can be null if none loaded.
        Returns:
        the full spreadsheet
      • getIndices

        public int[] getIndices()
        Returns the indices of the (actual) selected rows.
        Returns:
        the indices, null if "Close" was selected
      • getFilename

        public String getFilename()
        Returns the currently selected filename, "" if none selected.
        Returns:
        the filename, "" if none selected
      • loadFile

        protected void loadFile​(boolean reload)
        Loads the file and displays the IDs.
        Parameters:
        reload - whether we're loading a new file or just reloading the current one
      • acceptSelection

        protected void acceptSelection()
        Generates the indices.
      • search

        protected void search()
        Performs a search in the fields.
      • close

        protected void close()
        Closes the dialog.
      • beforeShow

        protected void beforeShow()
        Hook method just before the dialog is made visible.
        Overrides:
        beforeShow in class BaseDialog
      • setCurrentDirectory

        public void setCurrentDirectory​(File value)
        Sets the current directory to use for the file chooser.
        Parameters:
        value - the current directory
      • getCurrentDirectory

        public File getCurrentDirectory()
        Returns the current directory in use by the file chooser.
        Returns:
        the current directory
      • setCurrent

        public void setCurrent​(File value)
        Sets the current file.
        Parameters:
        value - the file to set
      • getCurrent

        public File getCurrent()
        Returns the current file.
        Returns:
        the current file
      • setAcceptListener

        public void setAcceptListener​(ChangeListener l)
        Sets the listener for the event that the user accepts the input.
        Parameters:
        l - the listener to use
      • getAcceptListener

        public ChangeListener getAcceptListener()
        Returns the listener for the event that the user accepts the input.
        Returns:
        the listener in use, null if none set
      • setCancelListener

        public void setCancelListener​(ChangeListener l)
        Sets the listener for the event that the user discarded the input.
        Parameters:
        l - the listener to use
      • getCancelListener

        public ChangeListener getCancelListener()
        Returns the listener for the event that the user discarded the input.
        Returns:
        the listener in use, null if none set