Class MultiExplorer

  • All Implemented Interfaces:
    adams.gui.core.AbstractNamedHistoryPanel.HistoryEntrySelectionListener, ImageObserver, MenuContainer, Serializable, Accessible

    public class MultiExplorer
    extends adams.gui.core.BasePanel
    implements adams.gui.core.AbstractNamedHistoryPanel.HistoryEntrySelectionListener
    Extended interface for the WEKA Explorer, allowing for an arbitrary number of Explorer panels.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_SplitPane

        protected JSplitPane m_SplitPane
        the split pane for the components.
      • m_PanelExplorer

        protected adams.gui.core.BasePanel m_PanelExplorer
        the actual panel for displaying the other panels.
      • m_PanelHistory

        protected adams.gui.core.BasePanel m_PanelHistory
        the history panel.
      • m_PanelButtons

        protected adams.gui.core.BasePanel m_PanelButtons
        the panel for the buttons.
      • m_ButtonAdd

        protected adams.gui.core.BaseButton m_ButtonAdd
        the button for adding a panel.
      • m_ButtonCopy

        protected adams.gui.core.BaseButton m_ButtonCopy
        the button for copying a panel.
      • m_ButtonRemove

        protected adams.gui.core.BaseButton m_ButtonRemove
        the button for removing a panel.
      • m_ButtonWorkspace

        protected adams.gui.core.BaseButton m_ButtonWorkspace
        the button for managing the workspaces.
      • m_WorkspaceFileChooser

        protected adams.gui.chooser.BaseFileChooser m_WorkspaceFileChooser
        the file chooser for the workspaces.
      • m_Memory

        protected static weka.core.Memory m_Memory
        for monitoring the Memory consumption
    • Constructor Detail

      • MultiExplorer

        public MultiExplorer()
    • Method Detail

      • initialize

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

        protected void initGUI()
        For initializing the GUI.
        Overrides:
        initGUI in class adams.gui.core.BasePanel
      • finishInit

        protected void finishInit()
        finishes the initialization.
        Overrides:
        finishInit in class adams.gui.core.BasePanel
      • clear

        public void clear()
        Removes all panels.
      • count

        public int count()
        Returns the number of explorer panels.
        Returns:
        the number of panels
      • getHistory

        public ExplorerEntryPanel getHistory()
        Returns the underlying history panel.
        Returns:
        the panel
      • addPanel

        public void addPanel​(ExplorerExt panel,
                             String name)
        Adds the given explorer panel.
        Parameters:
        panel - the panel to add
        name - the name for the panel
      • removePanel

        public boolean removePanel​(String name)
        Removes the panel with the given name.
        Parameters:
        name - the name of the panel to remove
        Returns:
        true if successfully removed
      • removePanel

        public boolean removePanel​(int index)
        Removes the panel at the specified index.
        Parameters:
        index - the index of the panel to remove
        Returns:
        true if successfully removed
      • getPanel

        public ExplorerExt getPanel​(String name)
        Returns the panel with the specified name.
        Parameters:
        name - the name of the panel to retrieve
        Returns:
        the panel, null if not found
      • load

        public void load​(File file)
        Loads the specified file in a new panel.
        Parameters:
        file - the file to load
      • load

        public void load​(File[] files)
        Loads the specified files in new panels.
        Parameters:
        files - the files to load
      • openWorkspace

        protected void openWorkspace()
        Opens a workspace.
      • saveWorkspace

        public void saveWorkspace()
        Saves the current workspace.
      • getEntryPanel

        public ExplorerEntryPanel getEntryPanel()
        Returns the panel with the explorer panel entries.
        Returns:
        the panel entries
      • historyEntrySelected

        public void historyEntrySelected​(adams.gui.core.AbstractNamedHistoryPanel.HistoryEntrySelectionEvent e)
        Gets called whenever a history entry gets selected.
        Specified by:
        historyEntrySelected in interface adams.gui.core.AbstractNamedHistoryPanel.HistoryEntrySelectionListener
        Parameters:
        e - the event
      • updateButtons

        protected void updateButtons()
        Updates the enabled state of the buttons.
      • runExplorer

        public static void runExplorer​(String[] args)
        Runs an explorer instance. Also interpretes the "-env classname" parameter.
        Parameters:
        args - the command-line arguments
      • main

        public static void main​(String[] args)
        Starts the explorer environment.
        Parameters:
        args - the command-line arguments: [-env classname] [initial dataset]