Class AddClassification

  • All Implemented Interfaces:
    CleanUpHandler, Destroyable, OptionHandler, BaseAction, ActionListener, Serializable, Cloneable, EventListener, Action

    public class AddClassification
    extends AbstractPixelSelectorAction
    Allows the user to select a pixel location and add a corresponding classification for it.
    Stores the location with prefix 'Pixel.X.' and 'Pixel.Y.' and the classification using 'Classification.' as prefix.

    Valid options are:

    -label <adams.core.base.BaseString> [-label ...] (property: labels)
        The labels to offer the user for classifying the pixel.
        default: 
     
    -remember-last-selection (property: rememberLastSelection)
        If enabled, the last selected label will get selected by default the next 
        time this action is chosen.
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Labels

        protected BaseString[] m_Labels
        the classification labels to use.
      • m_RememberLastSelection

        protected boolean m_RememberLastSelection
        whether to remember the last selection.
    • Constructor Detail

      • AddClassification

        public AddClassification()
    • Method Detail

      • setLabels

        public void setLabels​(BaseString[] value)
        Sets the available classification labels.
        Parameters:
        value - the labels
      • getLabels

        public BaseString[] getLabels()
        Returns the available classification labels.
        Returns:
        the labels
      • labelsTipText

        public String labelsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setRememberLastSelection

        public void setRememberLastSelection​(boolean value)
        Sets whether to remember the last selected label.
        Parameters:
        value - true if to remember
      • getRememberLastSelection

        public boolean getRememberLastSelection()
        Returns whether to remmeber the last selected label.
        Returns:
        true if remembered
      • rememberLastSelectionTipText

        public String rememberLastSelectionTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getNextClassificationIndex

        protected int getNextClassificationIndex​(Report report)
        Returns the next free classification index.
        Parameters:
        report - the report to check against
        Returns:
        the next free index