Class CompositeOutlinePainter

java.lang.Object
org.pushingpixels.radiance.theming.api.painter.outline.CompositeOutlinePainter
All Implemented Interfaces:
RadianceOutlinePainter, RadianceTrait

public class CompositeOutlinePainter extends Object implements RadianceOutlinePainter
Composite outline painter that delegates the painting of outer and inner outlines.
  • Field Details

    • displayName

      private String displayName
      Display name of this outline painter.
    • inner

      private RadianceOutlinePainter inner
      Delegate painter for painting the inner outlines.
    • outer

      private RadianceOutlinePainter outer
      Delegate painter for painting the outer outlines.
  • Constructor Details

    • CompositeOutlinePainter

      public CompositeOutlinePainter(String displayName, RadianceOutlinePainter outer, RadianceOutlinePainter inner)
      Creates a new composite outline painter.
      Parameters:
      displayName - Display name.
      outer - Delegate painter for painting the outer outlines.
      inner - Delegate painter for painting the inner outlines.
  • Method Details

    • 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.
    • paintOutline

      public void paintOutline(Graphics g, Component c, float width, float height, Shape outline, 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.
    • getDisplayName

      public String getDisplayName()
      Description copied from interface: RadianceTrait
      Returns the display name of this trait. This method is part of officially supported API.
      Specified by:
      getDisplayName in interface RadianceTrait
      Returns:
      The display name of this trait.