Class CompareTab

    • Field Detail

      • m_ComboBoxFirstDataset

        protected adams.gui.core.BaseComboBox<String> m_ComboBoxFirstDataset
        the first dataset.
      • m_ComboBoxSecondDataset

        protected adams.gui.core.BaseComboBox<String> m_ComboBoxSecondDataset
        the second dataset.
      • m_PanelDatasets

        protected JPanel m_PanelDatasets
        the panel for the datasets.
      • m_TextFirstRange

        protected adams.gui.core.BaseTextField m_TextFirstRange
        the text field for the first attribute range.
      • m_TextSecondRange

        protected adams.gui.core.BaseTextField m_TextSecondRange
        the text field for the second attribute range.
      • m_PanelStructure

        protected JPanel m_PanelStructure
        the panel for the structure.
      • m_ButtonStructure

        protected adams.gui.core.BaseButton m_ButtonStructure
        the button for comparing the structure.
      • m_PanelComparison

        protected JPanel m_PanelComparison
        the overall panel for comparison.
      • m_TextStructure

        protected adams.gui.core.BaseTextArea m_TextStructure
        the text area with the structure output.
      • m_PanelData

        protected JPanel m_PanelData
        the panel for the data.
      • m_ComboBoxFirstID

        protected adams.gui.core.BaseComboBox<String> m_ComboBoxFirstID
        the ID attribute in the first dataset to use for comparing the data.
      • m_ComboBoxSecondID

        protected adams.gui.core.BaseComboBox<String> m_ComboBoxSecondID
        the ID attribute in the second dataset to use for comparing the data.
      • m_ButtonData

        protected adams.gui.core.BaseButton m_ButtonData
        the button for comparing the data.
      • m_TabbedPaneData

        protected adams.gui.core.BaseTabbedPane m_TabbedPaneData
        the tabbed pane for the data.
      • m_TextOnlyFirst

        protected adams.gui.core.BaseTextArea m_TextOnlyFirst
        the IDs only present in the first dataset.
      • m_TextCommon

        protected adams.gui.core.BaseTextArea m_TextCommon
        the IDs present in both datasets.
      • m_TextOnlySecond

        protected adams.gui.core.BaseTextArea m_TextOnlySecond
        the IDs only present in the second dataset.
      • m_ListCommonIDs

        protected adams.gui.core.BaseList m_ListCommonIDs
        the JList with the common IDs.
      • m_PanelBoth

        protected InstancePanel m_PanelBoth
        the panel for displaying the two instances.
      • m_PanelDifference

        protected InstancePanel m_PanelDifference
        the panel with the difference.
      • m_ReportTable

        protected adams.gui.visualization.report.ReportFactory.Table m_ReportTable
        the table with the report.
      • m_FirstData

        protected weka.core.Instances m_FirstData
        the first dataset.
      • m_FirstAttributes

        protected gnu.trove.list.TIntList m_FirstAttributes
        the first set of attributes.
      • m_SecondData

        protected weka.core.Instances m_SecondData
        the second dataset.
      • m_SecondAttributes

        protected gnu.trove.list.TIntList m_SecondAttributes
        the second set of attributes.
      • m_FileChooserIDs

        protected adams.gui.chooser.TextFileChooser m_FileChooserIDs
        the file saver for storing the IDs.
    • Constructor Detail

      • CompareTab

        public CompareTab()
    • Method Detail

      • initGUI

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

        protected JPanel createIDInfoPanel​(adams.gui.core.BaseTextArea textArea)
        Generates an info panel for an ID text area.
        Parameters:
        textArea - the area for which to generate the panel
        Returns:
        the generated panel
      • finishInit

        protected void finishInit()
        Finishes up the initialization.
        Overrides:
        finishInit in class adams.gui.core.BasePanel
      • getStructure

        protected weka.core.Instances getStructure​(weka.core.Instances data,
                                                   String rangeStr,
                                                   gnu.trove.list.TIntList indices)
        Returns the dataset structure.
        Parameters:
        data - the dataset
        rangeStr - the range string
        Returns:
        the structure
      • compareStructure

        protected void compareStructure()
        Compares the structure.
      • getIDs

        protected List<String> getIDs​(weka.core.Instances dataset,
                                      int index)
        Retrieves the IDs from the dataset.
        Parameters:
        dataset - the dataset to use
        index - the attribute index
        Returns:
        the generated list
      • getInstance

        protected Instance getInstance​(weka.core.Instances dataset,
                                       int index,
                                       String id,
                                       gnu.trove.list.TIntList attributes)
        Returns the instance from the dataset with the specified ID.
        Parameters:
        dataset - the dataset to get the instance from
        index - the ID attribute index
        id - the ID
        attributes - the attribute indices to use
        Returns:
        the instance, null if not found
      • compareInstances

        protected void compareInstances()
        Performs the comparison between the rows from the two datasets.
      • compareIDs

        protected void compareIDs()
        Compares the IDs.
      • compareData

        protected void compareData()
        Compares the data
      • clear

        protected void clear()
        Clears the content.
      • updateWidgets

        protected void updateWidgets()
        Updates the state of the widgets.
      • doDeserialize

        protected void doDeserialize​(Map<String,​Object> data,
                                     adams.core.MessageCollection errors)
        Restores the objects.
        Overrides:
        doDeserialize in class AbstractInvestigatorTab
        Parameters:
        data - the data to restore
        errors - for storing errors