Class LoadDatasetDialog

    • Field Detail

      • m_ButtonReload

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

        protected InstanceTable 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_ComboBoxClass

        protected BaseComboBox m_ComboBoxClass
        the class index.
      • 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_CheckBoxIncludeNumericAttributes

        protected BaseCheckBox m_CheckBoxIncludeNumericAttributes
        whether to include numeric attributes.
      • m_CheckBoxIncludeDateAttributes

        protected BaseCheckBox m_CheckBoxIncludeDateAttributes
        whether to include date attributes.
      • m_CheckBoxIncludeNominalAttributes

        protected BaseCheckBox m_CheckBoxIncludeNominalAttributes
        whether to include numeric nominal.
      • m_CheckBoxIncludeStringAttributes

        protected BaseCheckBox m_CheckBoxIncludeStringAttributes
        whether to include string attributes.
      • m_CheckBoxIncludeRelationalAttributes

        protected BaseCheckBox m_CheckBoxIncludeRelationalAttributes
        whether to include relational attributes.
      • m_Instances

        protected weka.core.Instances m_Instances
        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_DefaultIncludeNumericAttributes

        protected boolean m_DefaultIncludeNumericAttributes
        the default for numeric attributes.
      • m_DefaultIncludeDateAttributes

        protected boolean m_DefaultIncludeDateAttributes
        the default for date attributes.
      • m_DefaultIncludeNominalAttributes

        protected boolean m_DefaultIncludeNominalAttributes
        the default for nominal attributes.
      • m_DefaultIncludeStringAttributes

        protected boolean m_DefaultIncludeStringAttributes
        the default for string attributes.
      • m_DefaultIncludeRelationalAttributes

        protected boolean m_DefaultIncludeRelationalAttributes
        the default for relational attributes.
      • 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

      • LoadDatasetDialog

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

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

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

        public LoadDatasetDialog​(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
      • setDefaultClassIndex

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

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

        public int getCurrentClassIndex()
        Returns the currently selected class index.
        Returns:
        the class index, -1 if none selected
      • 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
      • getDataset

        public weka.core.Instances getDataset()
        Returns the full dataset, can be null if none loaded.
        Returns:
        the full dataset
      • getIndices

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

        public void setDefaultIncludeAttributes​(int attType,
                                                boolean value)
        Sets the default for the specified type of attribute.
        Parameters:
        attType - the attribute type
        value - true if to restrict to attribute type by default
        See Also:
        Attribute
      • getDefaultInclueAttributes

        public boolean getDefaultInclueAttributes​(int attType)
        Returns the default for the specified attribute type.
        Parameters:
        attType - the attribute type
        Returns:
        true if to include to attribute type by default
        See Also:
        Attribute
      • setIncludeAttributes

        public void setIncludeAttributes​(int attType,
                                         boolean value)
        Sets whether only numeric attributes should be used.
        Parameters:
        attType - the attribute type
        value - if true then only numeric attributes will be used
        See Also:
        Attribute
      • getIncludeAttributes

        public boolean getIncludeAttributes​(int attType)
        Returns whether only numeric attributes should be used.
        Parameters:
        attType - the attribute type
        Returns:
        true if only numeric attributes to be used
        See Also:
        Attribute
      • 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