Class AbstractPixelSelectorAction

    • Constructor Detail

      • AbstractPixelSelectorAction

        public AbstractPixelSelectorAction()
        Initializes the object.
    • Method Detail

      • globalInfo

        public abstract String globalInfo()
        Returns a string describing the object.
        Returns:
        a description suitable for displaying in the gui
      • getTitle

        protected abstract String getTitle()
        Returns the title of the action (used as menu item text).
        Returns:
        the title
      • reset

        protected void reset()
        Resets the scheme.
      • newOptionManager

        protected OptionManager newOptionManager()
        Returns a new instance of the option manager.
        Returns:
        the manager to use
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options. Derived classes must override this method to add additional options.
        Specified by:
        defineOptions in interface OptionHandler
      • finishInit

        protected void finishInit()
        Finishes the initialization in the constructor.

        Default implementation does nothing.
      • destroy

        public void destroy()
        Frees up memory in a "destructive" non-reversible way.

        Cleans up the options.
        Specified by:
        destroy in interface Destroyable
        See Also:
        cleanUpOptions()
      • toString

        public String toString()
        Returns a string representation of the options.
        Overrides:
        toString in class Object
        Returns:
        a string representation
      • toCommandLine

        public String toCommandLine()
        Returns the commandline string.
        Specified by:
        toCommandLine in interface OptionHandler
        Returns:
        the commandline
      • setMousePosition

        public void setMousePosition​(Point value)
        Stores the mouse position in the action.
        Parameters:
        value - the current mouse position, null to remove it
      • hasMousePosition

        public boolean hasMousePosition()
        Checks whether a mouse position is available.
        Returns:
        true if position is available
      • getMousePosition

        public Point getMousePosition()
        Returns the mouse position, if available.
        Returns:
        the position, null if not availabel
      • setPixelPosition

        public void setPixelPosition​(Point value)
        Stores the pixel position in the action.
        Parameters:
        value - the current pixel position, null to remove it
      • hasPixelPosition

        public boolean hasPixelPosition()
        Checks whether a pixel position is available.
        Returns:
        true if position is available
      • getPixelPosition

        public Point getPixelPosition()
        Returns the pixel position, if available.
        Returns:
        the position, null if not availabel
      • setPanel

        public void setPanel​(PixelSelectorPanel value)
        Stores the panel in the action.
        Parameters:
        value - the panel, null to remove it
      • hasPanel

        public boolean hasPanel()
        Checks whether a panel is available.
        Returns:
        true if panel is available
      • getPanel

        public PixelSelectorPanel getPanel()
        Returns the panel, if available.
        Returns:
        the panel, null if not availabel
      • doProcessAction

        protected abstract boolean doProcessAction​(ActionEvent e)
        Reacts to the action event.
        Parameters:
        e - the event
        Returns:
        true if to update the report table
      • check

        public String check()
        Performs a check on the setup.

        Default implementation always returns null.
        Returns:
        null if check passed, otherwise the error message