Class DefaultHighlighterFactory

    • Field Detail

      • LOCAL_HIGHLIGHTING_COLOR

        public static final java.awt.Color LOCAL_HIGHLIGHTING_COLOR
      • GLOBAL_HIGHLIGHTING_COLOR

        public static final java.awt.Color GLOBAL_HIGHLIGHTING_COLOR
    • Constructor Detail

      • DefaultHighlighterFactory

        public DefaultHighlighterFactory()
    • Method Detail

      • createHighlighter

        public Highlighter createHighlighter​(Element element)
        Specified by:
        createHighlighter in interface HighlighterFactory
        Returns:
        a Highlighter for the given Element Current implementation returns a View appropriate for the following elements :
        • PicEllipse -> EllipseHighlighter ;
        • PicCircleFrom3Points -> CircleHighlighter ;
        • BranchElement -> CompositeHighlighter ;
        • PicParallelogram -> ParallelogramHighlighter ;
        • PicText -> TextHighlighter ;
        • other -> DefaultHighlighter
      • createStroke

        protected java.awt.Stroke createStroke​(double scale)
        Returns a Stroke object suited for painting hightlighter's stroke, e.g. tangents.
        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 lines/rectangle/... appear with the same length on the screen whatever the scale factor that's set to the graphic context.