Class DefaultHighlighterFactory.CompositeHighlighter

    • Field Detail

      • LOCAL_MODE

        public static final java.lang.String LOCAL_MODE
        Highlighting mode corresponding to each Element belonging to the selection is highlighted
        See Also:
        Constant Field Values
      • GLOBAL_MODE

        public static final java.lang.String GLOBAL_MODE
        Highlighting mode corresponding to the selection-handler behaving as if it were a PicGroup, hence its 8 control-points only are highlighted
        See Also:
        Constant Field Values
      • highlightingMode

        protected java.lang.String highlightingMode
        highlight mode
    • Constructor Detail

      • CompositeHighlighter

        public CompositeHighlighter​(BranchElement e)
        construct a new Highlighter for the given PicGroup
    • Method Detail

      • setHighlightingMode

        public void setHighlightingMode​(java.lang.String mode)
        set the current highlighting mode ; this influences the way the Highligther is painted, but also the result returned by HitTest.
        Parameters:
        mode - or LOCAL_MODE or GLOBAL_MODE
      • getHighlightingMode

        public java.lang.String getHighlightingMode()
        Return the current highlighting mode
      • toggleHighlightingMode

        public void toggleHighlightingMode()
        Toggle the current highlighting mode
      • syncShape

        protected void syncShape​(double scale)
        Synchronize the array of "shapes" needed to paint this highlighter, with the model ;
        Overrides:
        syncShape in class DefaultHighlighterFactory.DefaultHighlighter
        Parameters:
        scale - The current scale factor from-model-to-screen for the Graphics2D context ; this may be used to scale down line thickess, etc... so that e.g. barbells appear with the same size on the screen whatever the scale factor being set to the graphic context.
      • paint

        public void paint​(java.awt.Graphics2D g,
                          java.awt.geom.Rectangle2D allocation,
                          double scale)
        Render the Highlighter to the given graphic context.
        Specified by:
        paint in interface Highlighter
        Overrides:
        paint in class DefaultHighlighterFactory.DefaultHighlighter
        allocation - current clipping
        scale - The current scale factor from-model-to-screen for the Graphics2D context ; this may be used to scale down line thickess, etc... so that e.g. barbells appear with the same size on the screen whatever the scale factor being set to the graphic context.