Class DatasetCompatibilityPanel

  • All Implemented Interfaces:
    adams.gui.core.MenuBarProvider, adams.gui.sendto.SendToActionSupporter, ImageObserver, MenuContainer, Serializable, Accessible

    public class DatasetCompatibilityPanel
    extends adams.gui.core.BasePanel
    implements adams.gui.core.MenuBarProvider, adams.gui.sendto.SendToActionSupporter
    Compares the headers of a number of datasets and outputs the results.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_FileChooser

        protected WekaFileChooser m_FileChooser
        the filechooser for selecting the datasets.
      • m_TextArea

        protected adams.gui.core.BaseTextArea m_TextArea
        the text area to output the results in.
      • m_CurrentFiles

        protected File[] m_CurrentFiles
        the selected files.
      • m_CurrentLoader

        protected weka.core.converters.AbstractFileLoader m_CurrentLoader
        the current loader.
      • m_MenuBar

        protected JMenuBar m_MenuBar
        the menu bar.
      • m_MenuItemReload

        protected JMenuItem m_MenuItemReload
        the reload menu item.
    • Constructor Detail

      • DatasetCompatibilityPanel

        public DatasetCompatibilityPanel()
    • 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.
      • open

        public void open()
        Brings up dialog for selecting files.
      • open

        public String open​(File[] files)
        Opens the specified files, determines the loader automatically.
        Parameters:
        files - the files to open
        Returns:
        null if successful, otherwise error message
      • open

        protected String open​(File[] files,
                              weka.core.converters.AbstractFileLoader loader)
        Opens the specified files with the given loader.
        Parameters:
        files - the files to open
        loader - the loader to use
        Returns:
        null if successful, otherwise error message
      • compare

        protected void compare​(File[] files,
                               weka.core.Instances[] datasets)
        Performs the actual comparison.
        Parameters:
        files - the files the data originated from
        datasets - the datasets to compare
      • reload

        public void reload()
        Re-compares the currently loaded files.
      • close

        public void close()
        Closes the dialog.
      • getSendToClasses

        public Class[] getSendToClasses()
        Returns the classes that the supporter generates.
        Specified by:
        getSendToClasses in interface adams.gui.sendto.SendToActionSupporter
        Returns:
        the classes
      • hasSendToItem

        public boolean hasSendToItem​(Class[] cls)
        Checks whether something to send is available.
        Specified by:
        hasSendToItem in interface adams.gui.sendto.SendToActionSupporter
        Parameters:
        cls - the requested classes
        Returns:
        true if an object is available for sending
      • getSendToItem

        public Object getSendToItem​(Class[] cls)
        Returns the object to send.
        Specified by:
        getSendToItem in interface adams.gui.sendto.SendToActionSupporter
        Parameters:
        cls - the requested classes
        Returns:
        the item to send