Class AbstractAnnotator

    • Field Detail

      • m_Selecting

        protected boolean m_Selecting
        whether the selection box is currently been drawn.
    • Constructor Detail

      • AbstractAnnotator

        public AbstractAnnotator()
    • Method Detail

      • setOwner

        public void setOwner​(ObjectAnnotationPanel value)
        Sets the owner.
        Parameters:
        value - the owner
      • doInstall

        protected abstract void doInstall()
        Installs the annotator with the owner.
      • install

        public void install()
        Installs the annotator with the owner.
      • doUninstall

        protected abstract void doUninstall()
        Uninstalls the annotator with the owner.
      • uninstall

        public void uninstall()
        Uninstalls the annotator with the owner.
      • annotationsChanged

        public void annotationsChanged()
        Hook method for when annotations change.
      • hasCurrentLabel

        public boolean hasCurrentLabel()
        Checks whether an actual label is set.
        Returns:
        true if actual label set
      • getCurrentLabel

        public String getCurrentLabel()
        Returns the currently set label.
        Returns:
        the label, can be null
      • labelChanged

        public void labelChanged()
        Gets called when the label changes.
        Default implementation does nothing.
      • getStrokeWidth

        protected float getStrokeWidth​(Graphics g,
                                       float defValue)
        Returns the thickness of the stroke.
        Parameters:
        g - graphics context to get the thickness from
        defValue - the default value to return in case of failure
        Returns:
        the stroke, default value if failed to extract
      • applyStroke

        protected void applyStroke​(Graphics g,
                                   float stroke)
        Applies the stroke thickness.
        Parameters:
        stroke - the thickness to apply
      • doPaintSelection

        protected abstract void doPaintSelection​(Graphics g)
        Paints the selection.
        Parameters:
        g - the graphics context
      • paintSelection

        public void paintSelection​(Graphics g)
        Paints the selection.
        Parameters:
        g - the graphics context
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface CleanUpHandler