Class CompositeOutlinePainter
- java.lang.Object
-
- org.pushingpixels.radiance.theming.api.painter.outline.CompositeOutlinePainter
-
- All Implemented Interfaces:
RadianceOutlinePainter,RadianceTrait
public class CompositeOutlinePainter extends java.lang.Object implements RadianceOutlinePainter
Composite outline painter that delegates the painting of outer and inner outlines.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringdisplayNameDisplay name of this outline painter.private RadianceOutlinePainterinnerDelegate painter for painting the inner outlines.private RadianceOutlinePainterouterDelegate painter for painting the outer outlines.
-
Constructor Summary
Constructors Constructor Description CompositeOutlinePainter(java.lang.String displayName, RadianceOutlinePainter outer, RadianceOutlinePainter inner)Creates a new composite outline painter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDisplayName()Returns the display name ofthistrait.booleanisPaintingInnerOutline()Returns boolean indication whether this outline painter is painting the inner outlines.voidpaintOutline(java.awt.Graphics g, java.awt.Component c, float width, float height, java.awt.Shape outline, java.awt.Shape innerOutline, ContainerColorTokens colorTokens)Paints the outline.
-
-
-
Field Detail
-
displayName
private java.lang.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 Detail
-
CompositeOutlinePainter
public CompositeOutlinePainter(java.lang.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 Detail
-
isPaintingInnerOutline
public boolean isPaintingInnerOutline()
Description copied from interface:RadianceOutlinePainterReturns boolean indication whether this outline painter is painting the inner outlines.- Specified by:
isPaintingInnerOutlinein interfaceRadianceOutlinePainter- Returns:
trueif this outline painter is painting the inner outlines,falseotherwise.
-
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:RadianceOutlinePainterPaints the outline.- Specified by:
paintOutlinein interfaceRadianceOutlinePainter- 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 java.lang.String getDisplayName()
Description copied from interface:RadianceTraitReturns the display name ofthistrait. This method is part of officially supported API.- Specified by:
getDisplayNamein interfaceRadianceTrait- Returns:
- The display name of
thistrait.
-
-