Class AbstractInvestigatorTab

    • Field Detail

      • m_Worker

        protected Thread m_Worker
        whether the evaluation is currently running.
      • m_FileChooserParameters

        protected adams.gui.chooser.ParameterMapFileChooser m_FileChooserParameters
        the file chooser.
      • m_ActualTitle

        protected String m_ActualTitle
        the actual title.
    • Constructor Detail

      • AbstractInvestigatorTab

        public AbstractInvestigatorTab()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class adams.gui.core.DetachablePanel
      • setOwner

        public void setOwner​(InvestigatorPanel value)
        Sets the owner for this tab.
        Parameters:
        value - the owner
      • getOwner

        public InvestigatorPanel getOwner()
        Returns the owner of this tab.
        Returns:
        the owner, null if none set
      • getTitle

        public abstract String getTitle()
        Returns the title of this tab.
        Returns:
        the title
      • setActualTitle

        public void setActualTitle​(String value)
        Sets the actual title to use.
        Parameters:
        value - the title
      • getActualTitle

        public String getActualTitle()
        Returns the actual title in use.
        Returns:
        the title, null if not set
      • getTabIcon

        public String getTabIcon()
        Returns the icon name for the tab icon.
        Default implementation returns null.
        Returns:
        the icon name, null if not available
      • getFileChooserParameters

        protected adams.gui.chooser.ParameterMapFileChooser getFileChooserParameters()
        Returns the file chooser for parameters.
        Returns:
        the chooser
      • createPopupMenu

        public JPopupMenu createPopupMenu()
        Creates and returns the popup menu.
        Overrides:
        createPopupMenu in class adams.gui.core.DetachablePanel
        Returns:
        the menu
      • getData

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

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

        public boolean canStartExecution()
        Returns whether a new job can be executed.
        Returns:
        true if job can get executed
      • postStartExecution

        protected void postStartExecution​(InvestigatorTabJob job)
        Hook method that gets called after successfully starting a job.
        Parameters:
        job - the job that got started
      • startExecution

        public boolean startExecution​(InvestigatorTabJob job)
        Starts the job.
        Parameters:
        job - the job to execute
      • postStopExecution

        protected void postStopExecution()
        Hook method that gets called after stopping a job.
      • stopExecution

        public void stopExecution()
        Stops the evaluation.
      • postExecutionFinished

        protected void postExecutionFinished()
        Hook method that gets called after finishing a job.
      • executionFinished

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

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

        protected String[] toParamsArray​(Object params)
        Turns a parameter object into a string array.
        Parameters:
        params - the parameters to convert
        Returns:
        the string array
      • saveParameters

        public void saveParameters()
        Prompts the user to select a yaml file to store the parameters of the tab under.
      • loadParameters

        public void loadParameters()
        Prompts the user to select a yaml file to load the parameters for this tab from.
      • doDeserialize

        protected void doDeserialize​(Map<String,​Object> data,
                                     adams.core.MessageCollection errors)
        Restores the objects.
        Default implementation does nothing.
        Parameters:
        data - the data to restore
        errors - for storing errors
      • deserialize

        public void deserialize​(Object data,
                                adams.core.MessageCollection errors)
        Deserializes the data and configures the tab.
        Parameters:
        data - the serialized data to restore the tab with
        errors - for storing errors
      • logMessage

        public void logMessage​(String msg)
        Logs the message.
        Parameters:
        msg - the log message
      • logError

        public void logError​(String msg,
                             Throwable t,
                             String title)
        Logs the exception and also displays an error dialog.
        Parameters:
        msg - the log message
        t - the exception
        title - the title for the dialog
      • logError

        public void logError​(String msg,
                             String title)
        Logs the error message and also displays an error dialog.
        Parameters:
        msg - the error message
        title - the title for the dialog
      • showStatus

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