Class InvestigatorPanel

    • Field Detail

      • FILENAME_SHORTCUTS

        public static final String FILENAME_SHORTCUTS
        the name of the shortcut props file.
        See Also:
        Constant Field Values
      • m_Properties

        protected static Properties m_Properties
        the properties.
      • m_ShortcutProperties

        protected static Properties m_ShortcutProperties
        the shortcut properties.
      • m_StatusBar

        protected BaseStatusBar m_StatusBar
        the status bar.
      • m_MenuBar

        protected JMenuBar m_MenuBar
        the menu bar.
      • m_MenuFileSources

        protected BaseMenu m_MenuFileSources
        the submenu for a sources.
      • m_ActionFileClose

        protected BaseAction m_ActionFileClose
        the action for closing the investigator.
      • m_MenuItemOptionsUndoEnabled

        protected JCheckBoxMenuItem m_MenuItemOptionsUndoEnabled
        the menu item for enabling/disabling undo.
      • m_MenuItemOptionsCalculateModelSize

        protected JCheckBoxMenuItem m_MenuItemOptionsCalculateModelSize
        the menu item for enabling/disabling model size calculation.
      • m_MenuItemOptionsSortAttributeNames

        protected JCheckBoxMenuItem m_MenuItemOptionsSortAttributeNames
        the menu item for enabling/disabling sorting of attribute names.
      • m_ActionFileClear

        protected BaseAction m_ActionFileClear
        the action for clearing all datasets.
      • m_ActionFileOpen

        protected BaseAction m_ActionFileOpen
        the action for loading a dataset.
      • m_ActionFileClassAttribute

        protected BaseAction m_ActionFileClassAttribute
        the action for selecting the class attribute heuristic.
      • m_ActionFileRelationName

        protected BaseAction m_ActionFileRelationName
        the action for selecting the relation name heuristic.
      • m_ActionFileStopJob

        protected BaseAction m_ActionFileStopJob
        the action for stopping a job.
      • m_MenuTabNewTab

        protected BaseMenu m_MenuTabNewTab
        the submenu for a new tab.
      • m_ActionTabCopyTab

        protected BaseAction m_ActionTabCopyTab
        the action for copying a tab.
      • m_ActionTabSaveParameters

        protected BaseAction m_ActionTabSaveParameters
        the action for saving parmeters of a tab.
      • m_ActionTabLoadParameters

        protected BaseAction m_ActionTabLoadParameters
        the action for loading parameters for a tab.
      • m_ActionTabCloseTab

        protected BaseAction m_ActionTabCloseTab
        the action for closing a tab.
      • m_ActionTabUndoCloseTab

        protected BaseAction m_ActionTabUndoCloseTab
        the action for undoing closed a tab.
      • m_ActionTabCloseAllTabs

        protected BaseAction m_ActionTabCloseAllTabs
        the action for closing all tabs.
      • m_FileChooser

        protected WekaFileChooser m_FileChooser
        the filechooser for datasets.
      • m_StatusBarDateFormat

        protected DateFormat m_StatusBarDateFormat
        for timestamps in the statusbar.
      • m_Worker

        protected Thread m_Worker
        for executing operations (loading files etc).
    • Constructor Detail

      • InvestigatorPanel

        public InvestigatorPanel()
    • Method Detail

      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class BasePanel
      • addDefaultTabs

        public void addDefaultTabs()
        Adds the default tabs.
      • initActions

        protected void initActions()
        Initializes the actions.
      • updateActions

        protected void updateActions()
        Updates the actions.
      • isBusy

        public boolean isBusy()
        Returns whether the tab is busy.
        Returns:
        true if busy
      • startExecution

        public boolean startExecution​(InvestigatorJob job)
        Starts a job.
        Parameters:
        job - the job to execute
      • stopExecution

        public void stopExecution()
        Stops the evaluation.
      • executionFinished

        public void executionFinished()
        Gets called when a job finishes.
      • getTimestampPrefix

        protected String getTimestampPrefix()
        Return the timestamp prefix for logs.
        Returns:
        the prefix
      • logAndShowMessage

        public void logAndShowMessage​(String msg)
        Logs the error message and shows it in the status bar.
        Parameters:
        msg - the error message
      • logError

        public void logError​(String msg,
                             String title)
        Logs the error message and also displays an error dialog.
        Specified by:
        logError in class AbstractWorkspacePanel
        Parameters:
        msg - the error message
        title - the title for the dialog
      • getLog

        public StringBuilder getLog()
        Returns the internal log buffer.
        Returns:
        the buffer
      • clearLog

        public void clearLog()
        Empties the log.
      • getData

        public DataContainerList getData()
        Returns the currently loaded data.
        Returns:
        the data
      • fireDataChange

        public void fireDataChange​(WekaInvestigatorDataEvent e)
        Notifies all the tabs that the data has changed.
        Parameters:
        e - the event to send
      • getTabbedPane

        public InvestigatorTabbedPane getTabbedPane()
        Returns the underlying tabbed pane.
        Returns:
        the tabbed pane
      • updateClassAttribute

        public weka.core.Instances updateClassAttribute​(weka.core.Instances data)
        Updates the class attribute, if not set.
        Parameters:
        data - the data to update
        Returns:
        the (potentially) updated data
      • updateRelationName

        public weka.core.Instances updateRelationName​(File file,
                                                      weka.core.Instances data)
        Updates the relation name.
        Parameters:
        file - the file the data was loaded from
        data - the data to update
        Returns:
        the (potentially) updated data
      • addRecentFile

        public String addRecentFile​(File file,
                                    weka.core.converters.AbstractFileLoader loader)
        Adds the specified file/loader combination to the recent files list.
        Parameters:
        file - the file to add
        loader - the associated loader, if null uses auto-detect for loader
        Returns:
        null if successful or no recent files being managed, otherwise error message
      • clear

        public void clear()
        Removes all currently loaded datasets.
      • openFile

        public void openFile()
        Lets user select a dataset.
      • openFile

        public void openFile​(File file)
        Lets user select a dataset.
      • chooseClassAttributeHeuristic

        public void chooseClassAttributeHeuristic()
        Lets the user choose the class attribute heuristic.
      • setClassAttributeHeuristic

        public void setClassAttributeHeuristic​(AbstractClassAttributeHeuristic value)
        Sets the class attribute heuristic.
        Parameters:
        value - the heuristic
      • getClassAttributeHeuristic

        public AbstractClassAttributeHeuristic getClassAttributeHeuristic()
        Returns the current class attribute heuristic.
        Returns:
        the heuristic
      • chooseRelationNameHeuristic

        public void chooseRelationNameHeuristic()
        Lets the user choose the relation name heuristic.
      • setRelationNameHeuristic

        public void setRelationNameHeuristic​(AbstractRelationNameHeuristic value)
        Sets the relation name heuristic.
        Parameters:
        value - the heuristic
      • getRelationNameHeuristic

        public AbstractRelationNameHeuristic getRelationNameHeuristic()
        Returns the current relation name heuristic.
        Returns:
        the heuristic
      • isUndoEnabled

        public boolean isUndoEnabled()
        Returns whether undo is enabled.
        Returns:
        true if enabled
      • setUndoEnabled

        public void setUndoEnabled​(boolean value)
        Sets the undo state.
        Parameters:
        value - true if to enable
      • toggleUndo

        protected void toggleUndo()
        Toggles the undo state.
      • calculateModelSize

        public boolean calculateModelSize()
        Returns whether model sizes should get calculated.
        Returns:
        true if to calculate
      • setSortAttributeNames

        public void setSortAttributeNames​(boolean value)
        Sets whether to sort the attribute names.
        Parameters:
        value - true if to sort
      • getSortAttributeNames

        public boolean getSortAttributeNames()
        Returns whether to sort the attribute names.
        Returns:
        true if to sort
      • toggleSortAttributeNames

        protected void toggleSortAttributeNames()
        Toggles the "sort attribute names" option.
      • getProperties

        public static Properties getProperties()
        Returns the properties that define the investigator.
        Returns:
        the properties
      • getShortcutProperties

        public static Properties getShortcutProperties()
        Returns the properties that define the shortcuts.
        Returns:
        the properties