Class InstanceComparePanel.DatasetPanel

    • Field Detail

      • m_BorderTitle

        protected String m_BorderTitle
        the border title.
      • m_ID

        protected String m_ID
        the ID to use for the returned instances.
      • m_ButtonDisplay

        protected adams.gui.core.BaseButton m_ButtonDisplay
        the button for displaying the dataset.
      • m_TextAttributeRange

        protected adams.gui.core.BaseTextField m_TextAttributeRange
        the edit field for the range.
      • m_LabelAttributeRange

        protected JLabel m_LabelAttributeRange
        the label for the range.
      • m_ComboBoxRowAttribute

        protected adams.gui.core.BaseComboBox m_ComboBoxRowAttribute
        the combobox with the attribute names.
      • m_ComboBoxRowAttributeModel

        protected DefaultComboBoxModel m_ComboBoxRowAttributeModel
        the underlying model for the comboxbox.
      • m_LabelRowAttribute

        protected JLabel m_LabelRowAttribute
        the label for the attribute names.
    • Constructor Detail

      • DatasetPanel

        public DatasetPanel​(String title,
                            String id)
        Initializes the panel.
        Parameters:
        title - the title of the border
        id - the ID for the returned instances
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class adams.gui.core.BasePanel
      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class adams.gui.core.BasePanel
      • setBorderTitle

        public void setBorderTitle​(String value)
        Sets the title of the border.
        Parameters:
        value - the title
      • getBorderTitle

        public String getBorderTitle()
        Returns the title of the border.
        Returns:
        the title
      • setID

        public void setID​(String value)
        Sets the ID to use for the returned instances.
        Parameters:
        value - the ID
      • getID

        public String getID()
        Returns the ID to use for the returned instances.
        Returns:
        the ID
      • setDataset

        public void setDataset​(File value)
        Sets the dataset to use.
        Parameters:
        value - the dataset
      • getDataset

        public File getDataset()
        Return the currently selected dataset.
        Returns:
        the dataset
      • hasDataset

        public boolean hasDataset()
        Checks whether an existing file has been set.
        Returns:
        true if an existing file has been set
      • setAttributeRange

        public void setAttributeRange​(String value)
        Sets the range of attributes.
        Parameters:
        value - the range
      • getAttributeRange

        public String getAttributeRange()
        Returns the current range of attributes.
        Returns:
        the range
      • setRowIndex

        public void setRowIndex​(String value)
        Sets the index of the attribute to use for matching rows (only works if dataset already loaded).
        Parameters:
        value - the index (1-based, first and last OK as well), use "" to not use a specific attribute.
      • getRowIndex

        public String getRowIndex()
        Returns the currently selected.
        Returns:
        the range
      • update

        protected void update()
        Updates buttons, etc.
      • reload

        public void reload()
        Reloads the currently loaded dataset.
      • loadDataset

        protected void loadDataset()
        Loads the dataset, if possible.
      • displayDataset

        protected void displayDataset()
        Displays the dataset in a separate window.
      • getRows

        public List<String> getRows()
        Returns a list of row IDs.
        Returns:
        the available IDs
      • getRow

        public Instance getRow​(String row)
        Returns the row to display.
        Parameters:
        row - the ID of the row to retrieve
        Returns:
        the Instance, can be null
      • isString

        public boolean isString()
        Returns whether the index values are nominal/string or numeric.
        Returns:
        true if index is nominal/string
      • addChangeListener

        public void addChangeListener​(ChangeListener l)
        Adds the change listener to the internal list.
        Parameters:
        l - the listener to add
      • removeChangeListener

        public void removeChangeListener​(ChangeListener l)
        Removes the change listener from the internal list.
        Parameters:
        l - the listener to remove
      • notifyChangeListeners

        protected void notifyChangeListeners​(ChangeEvent e)
        Sends the event to all change listeners.
        Parameters:
        e - the event to send
      • fireSetupChanged

        public void fireSetupChanged()
        Fires a ChangeEvent that the setup has changed.