Class CompositeOutlinePainter
java.lang.Object
org.pushingpixels.radiance.theming.api.painter.outline.CompositeOutlinePainter
- All Implemented Interfaces:
RadianceOutlinePainter, RadianceTrait
Composite outline painter that delegates the painting of outer and inner
outlines.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringDisplay name of this outline painter.private RadianceOutlinePainterDelegate painter for painting the inner outlines.private RadianceOutlinePainterDelegate painter for painting the outer outlines. -
Constructor Summary
ConstructorsConstructorDescriptionCompositeOutlinePainter(String displayName, RadianceOutlinePainter outer, RadianceOutlinePainter inner) Creates a new composite outline painter. -
Method Summary
Modifier and TypeMethodDescriptionReturns the display name ofthistrait.booleanReturns boolean indication whether this outline painter is painting the inner outlines.voidpaintOutline(Graphics g, Component c, float width, float height, Shape outline, Shape innerOutline, ContainerColorTokens colorTokens) Paints the outline.
-
Field Details
-
displayName
Display name of this outline painter. -
inner
Delegate painter for painting the inner outlines. -
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: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(Graphics g, Component c, float width, float height, Shape outline, 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
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.
-