Class InstanceComparePanel

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.StatusMessageHandler, adams.gui.core.MenuBarProvider, ImageObserver, MenuContainer, Serializable, Accessible

    public class InstanceComparePanel
    extends adams.gui.core.BasePanel
    implements adams.core.StatusMessageHandler, adams.core.CleanUpHandler, adams.gui.core.MenuBarProvider
    A tool for comparing two datasets visually.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • SESSION_FILE_1

        public static final String SESSION_FILE_1
        the file to store the recent files in (first file).
        See Also:
        Constant Field Values
      • SESSION_FILE_2

        public static final String SESSION_FILE_2
        the file to store the recent files in (second file).
        See Also:
        Constant Field Values
      • m_Properties

        protected static adams.core.Properties m_Properties
        the properties.
      • m_PanelComparison

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

        protected InstancePanel m_PanelDifference
        the panel with the difference.
      • m_LabelRows

        protected JLabel m_LabelRows
        the label for the combobox.
      • m_ListRows

        protected adams.gui.core.BaseList m_ListRows
        the JLiast with the rows.
      • m_ListRowsModel

        protected DefaultListModel m_ListRowsModel
        the model for the combobox with the rows.
      • m_ReportTable

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

        protected adams.gui.core.BaseStatusBar m_StatusBar
        for displaying error messages.
      • m_RowIndex

        protected List<String> m_RowIndex
        the internal index.
      • m_MenuBar

        protected JMenuBar m_MenuBar
        the menu bar.
      • m_MenuItemReload

        protected JMenuItem m_MenuItemReload
        the reload menu item.
      • m_MenuItemLoadRecent1

        protected JMenuItem m_MenuItemLoadRecent1
        the recent file menu item (first file).
      • m_MenuItemLoadRecent2

        protected JMenuItem m_MenuItemLoadRecent2
        the recent file menu item (second file).
      • m_MenuView

        protected JMenu m_MenuView
        the menu item for view related stuff.
      • m_MenuItemViewAntiAliasing

        protected JMenuItem m_MenuItemViewAntiAliasing
        the toggle anti-aliasing menu item.
      • m_RecentFilesHandler1

        protected adams.gui.core.RecentFilesHandler<JMenu> m_RecentFilesHandler1
        the recent files handler.
      • m_RecentFilesHandler2

        protected adams.gui.core.RecentFilesHandler<JMenu> m_RecentFilesHandler2
        the recent files handler.
    • Constructor Detail

      • InstanceComparePanel

        public InstanceComparePanel()
    • 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
      • getMenuBar

        public JMenuBar getMenuBar()
        Creates a menu bar (singleton per panel object). Can be used in frames.
        Specified by:
        getMenuBar in interface adams.gui.core.MenuBarProvider
        Returns:
        the menu bar
      • updateMenu

        protected void updateMenu()
        updates the enabled state of the menu items.
      • reload

        public void reload()
        Reloads the datasets.
      • close

        public void close()
        closes the dialog/frame.
      • trimIDs

        protected List<String> trimIDs​(List<String> list)
        Removes the leading 0s.
        Parameters:
        list - the list to process
        Returns:
        the processed list
      • updateRows

        protected void updateRows()
        Updates the combobox with the rows.
      • performComparison

        protected void performComparison()
        Performs the comparison between the rows from the two datasets.
      • showStatus

        public void showStatus​(String msg)
        Displays a message.
        Specified by:
        showStatus in interface adams.core.StatusMessageHandler
        Parameters:
        msg - the message to display
      • setFirstDataset

        public void setFirstDataset​(File value)
        Sets the first dataset.
        Parameters:
        value - the first dataset
      • getFirstDataset

        public File getFirstDataset()
        Returns the first dataset.
        Returns:
        the first dataset
      • setFirstAttributeRange

        public void setFirstAttributeRange​(String value)
        Sets the first attribute range ('first' and 'last' can be used as well).
        Parameters:
        value - the attribute range
      • getFirstAttributeRange

        public String getFirstAttributeRange()
        Returns the first attribute range.
        Returns:
        the attribute range
      • setFirstRowIndex

        public void setFirstRowIndex​(String value)
        Sets the first row index ('first' and 'last' can be used as well).
        Parameters:
        value - the index of the row attribute
      • getFirstRowIndex

        public String getFirstRowIndex()
        Returns the first row index.
        Returns:
        the index of the row attribute (1-based, 'first', 'last')
      • setSecondDataset

        public void setSecondDataset​(File value)
        Sets the second dataset.
        Parameters:
        value - the second dataset
      • getSecondDataset

        public File getSecondDataset()
        Returns the second dataset.
        Returns:
        the second dataset
      • setSecondAttributeRange

        public void setSecondAttributeRange​(String value)
        Sets the second attribute range ('second' and 'last' can be used as well).
        Parameters:
        value - the attribute range
      • getSecondAttributeRange

        public String getSecondAttributeRange()
        Returns the second attribute range.
        Returns:
        the attribute range
      • setSecondRowIndex

        public void setSecondRowIndex​(String value)
        Sets the second row index ('second' and 'last' can be used as well).
        Parameters:
        value - the index of the row attribute
      • getSecondRowIndex

        public String getSecondRowIndex()
        Returns the second row index.
        Returns:
        the index of the row attribute (2-based, 'second', 'last')
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface adams.core.CleanUpHandler
      • getProperties

        public static adams.core.Properties getProperties()
        Returns the properties that define the editor.
        Returns:
        the properties