Class ScriptingCommandCode


  • public abstract class ScriptingCommandCode
    extends Object
    Class for the optional code to execute when a command finishes.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • m_Cmd

        protected String m_Cmd
        the command that was run.
      • m_BasePanel

        protected BasePanel m_BasePanel
        the affected base panel.
      • m_Error

        protected String m_Error
        a potential error message.
    • Constructor Detail

      • ScriptingCommandCode

        public ScriptingCommandCode()
    • Method Detail

      • setCommand

        public void setCommand​(String value)
        Sets the command that was executed.
        Parameters:
        value - the command
      • getCommand

        public String getCommand()
        Returns the command that was run.
        Returns:
        the command
      • setBasePanel

        public void setBasePanel​(BasePanel value)
        Sets the BasePanel that was affected.
        Parameters:
        value - the BasePanel
      • getBasePanel

        public BasePanel getBasePanel()
        Returns the BasePanel that was affected.
        Returns:
        the BasePanel
      • setError

        public void setError​(String value)
        Sets the error message, if any.
        Parameters:
        value - the error or null if none
      • getError

        public String getError()
        Returns the error message, if any.
        Returns:
        the error, null if none available
      • hasError

        public boolean hasError()
        Checks whether an error message exists.
        Returns:
        true if an error message exists
      • execute

        public abstract void execute()
        The code that gets executed after the command was run.