Class FractionBasedOutlinePainter

    • Constructor Detail

      • FractionBasedOutlinePainter

        public FractionBasedOutlinePainter​(java.lang.String displayName,
                                           float[] fractions,
                                           ContainerColorTokensSingleColorQuery[] colorQueries)
        Creates a new fraction-based outline painter.
        Parameters:
        displayName - The display name of this painter.
        fractions - The fractions of this painter. Must be strictly increasing, starting from 0.0 and ending at 1.0.
        colorQueries - The color queries of this painter. Must have the same size as the fractions array, and all entries must be non- null.
      • FractionBasedOutlinePainter

        public FractionBasedOutlinePainter​(java.lang.String displayName,
                                           float[] fractions,
                                           int[] alphas,
                                           ContainerColorTokensSingleColorQuery[] colorQueries)
        Creates a new fraction-based outline painter.
        Parameters:
        displayName - The display name of this painter.
        fractions - The fractions of this painter. Must be strictly increasing, starting from 0.0 and ending at 1.0.
        alphas - Alpha channels of this painter. Must have the same size as fractions.
        colorQueries - The color queries of this painter. Must have the same size as the fractions array, and all entries must be non- null.
    • Method Detail

      • paintOutline

        public void paintOutline​(java.awt.Graphics g,
                                 java.awt.Component c,
                                 float width,
                                 float height,
                                 java.awt.Shape outline,
                                 java.awt.Shape innerOutline,
                                 ContainerColorTokens colorTokens)
        Description copied from interface: RadianceOutlinePainter
        Paints the outline.
        Specified by:
        paintOutline in interface RadianceOutlinePainter
        Parameters:
        g - Graphics.
        c - Component.
        width - Width of a UI component.
        height - Height of a UI component.
        outline - Primary outline to paint.
        innerOutline - Optional inner outline to paint. May be ignored if the specific implementation paints only the primary outline.
        colorTokens - The color tokens.
      • isPaintingInnerOutline

        public boolean isPaintingInnerOutline()
        Description copied from interface: RadianceOutlinePainter
        Returns boolean indication whether this outline painter is painting the inner outlines.
        Specified by:
        isPaintingInnerOutline in interface RadianceOutlinePainter
        Returns:
        true if this outline painter is painting the inner outlines, false otherwise.