Class SpectralCommandProcessor

  • All Implemented Interfaces:
    adams.core.logging.LoggingSupporter, adams.core.SizeOfHandler, adams.core.Stoppable, adams.gui.core.UndoHandler, Serializable

    public class SpectralCommandProcessor
    extends adams.gui.scripting.CommandProcessor
    Command processor for the spectral module.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class adams.gui.scripting.AbstractCommandProcessor

        m_Actions, m_BasePanel, m_CurrentScriptlet, m_Owner
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected String checkRequirement​(Class requirement)
      Checks the following requirement.
      adams.gui.visualization.container.DataContainerPanel getDataContainerPanel()
      Returns the DataContainer panel.
      protected Class getRequiredFlowClass()
      Returns the class that is required in the flow.
      SpectrumPanel getSpectrumPanel()
      Returns the spectrum panel, if available.
      protected Object getUndoObject()
      Returns the object that is to be used for the undo point.
      protected void setupScriptlet​(adams.gui.scripting.AbstractScriptlet scriptlet)
      Performs further setups of the scriptlet.
      • Methods inherited from class adams.gui.scripting.CommandProcessor

        getDatabaseConnection
      • Methods inherited from class adams.gui.scripting.AbstractCommandProcessor

        addUndoPoint, checkRequirements, createRequirementError, findScriptlet, getBasePanel, getDataContainerUpdatingPostProcessor, getOwner, getStatusMessageHandler, getUndo, globalInfo, initScriptlets, isUndoSupported, process, setBasePanel, setOwner, setUndo, showStatus, stopExecution
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
    • Constructor Detail

      • SpectralCommandProcessor

        public SpectralCommandProcessor()
        Initializes the processor. Still needs to set the owner.
        See Also:
        AbstractCommandProcessor.setOwner(AbstractScriptingEngine)
      • SpectralCommandProcessor

        public SpectralCommandProcessor​(adams.gui.scripting.AbstractScriptingEngine owner)
        Initializes the processor.
        Parameters:
        owner - the owning scripting engine
    • Method Detail

      • getUndoObject

        protected Object getUndoObject()
        Returns the object that is to be used for the undo point.
        Overrides:
        getUndoObject in class adams.gui.scripting.CommandProcessor
        Returns:
        the object to store as undo point
      • getDataContainerPanel

        public adams.gui.visualization.container.DataContainerPanel getDataContainerPanel()
        Returns the DataContainer panel.
        Overrides:
        getDataContainerPanel in class adams.gui.scripting.AbstractCommandProcessor
        Returns:
        the panel or null
      • getSpectrumPanel

        public SpectrumPanel getSpectrumPanel()
        Returns the spectrum panel, if available.
        Returns:
        the panel
      • getRequiredFlowClass

        protected Class getRequiredFlowClass()
        Returns the class that is required in the flow.
        Overrides:
        getRequiredFlowClass in class adams.gui.scripting.AbstractCommandProcessor
        Returns:
        the required class
      • checkRequirement

        protected String checkRequirement​(Class requirement)
        Checks the following requirement.
        Overrides:
        checkRequirement in class adams.gui.scripting.AbstractCommandProcessor
        Parameters:
        requirement - the requirement class that needs to be present
        Returns:
        "" if met, error message if not met, null if not processed
      • setupScriptlet

        protected void setupScriptlet​(adams.gui.scripting.AbstractScriptlet scriptlet)
        Performs further setups of the scriptlet.
        Overrides:
        setupScriptlet in class adams.gui.scripting.AbstractCommandProcessor
        Parameters:
        scriptlet - the scriptlet to work on