Class SeparatorPainterUtils
java.lang.Object
org.pushingpixels.radiance.theming.internal.painter.SeparatorPainterUtils
Contains utility methods related to painting separators. This class is for internal use only.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Colorstatic Colorstatic voidpaintHorizontalLines(Graphics g, Component c, ContainerColorTokens tokens, int x, Collection<Integer> y, int width, float fadeStartFraction, boolean isLtr) static voidpaintSeparator(Component c, Graphics graphics, int width, int height, int orientation, boolean hasShadow, int maxGradLength) Paints a separator.static voidpaintSeparator(Component c, Graphics g, int width, int height, int orientation, boolean hasShadow, int maxGradLengthStart, int maxGradLengthEnd, boolean toEnforceAlphaColors) Paints a separator.static voidpaintSeparator(Component c, Graphics g, ContainerColorTokens colorTokens, int width, int height, int orientation, boolean hasShadow, int maxGradLengthStart, int maxGradLengthEnd, boolean toEnforceAlphaColors) static voidpaintSeparator(JSeparator separator, Graphics graphics, int width, int height, int orientation) Paints a separator.static voidpaintVerticalLines(Graphics g, Component c, ContainerColorTokens tokens, int y, Collection<Integer> x, int height, float fadeStartFraction)
-
Constructor Details
-
SeparatorPainterUtils
public SeparatorPainterUtils()
-
-
Method Details
-
paintSeparator
public static void paintSeparator(JSeparator separator, Graphics graphics, int width, int height, int orientation) Paints a separator.- Parameters:
separator- Component.graphics- Graphics context.width- Separator width.height- Separator height.orientation- Separator orientation.
-
paintSeparator
public static void paintSeparator(Component c, Graphics graphics, int width, int height, int orientation, boolean hasShadow, int maxGradLength) Paints a separator.- Parameters:
c- Component.graphics- Graphics context.width- Separator width.height- Separator height.orientation- Separator orientation.hasShadow- Iftrue, the separator painting will have shadow.maxGradLength- Specifies the maximum pixel length of "ramp" portions of the separator. The ramp portions are located on separator ends and allow providing a faded appearance on those ends.
-
paintSeparator
public static void paintSeparator(Component c, Graphics g, int width, int height, int orientation, boolean hasShadow, int maxGradLengthStart, int maxGradLengthEnd, boolean toEnforceAlphaColors) Paints a separator.- Parameters:
c- Component.g- Graphics context.width- Separator width.height- Separator height.orientation- Separator orientation.hasShadow- Iftrue, the separator painting will have shadow.maxGradLengthStart- Specifies the maximum pixel length of the starting "ramp" portion of the separator. The starting ramp portion is located on top / left separator end and allows providing a faded appearance on that end.maxGradLengthEnd- Specifies the maximum pixel length of the ending "ramp" portion of the separator. The ending ramp portion is located on bottom / right separator end and allows providing a faded appearance on that end.toEnforceAlphaColors- Iftrue, the fade sequences will always use alpha colors. This may affect the performance.
-
getPrimarySeparatorColor
-
getSecondarySeparatorColor
-
paintSeparator
public static void paintSeparator(Component c, Graphics g, ContainerColorTokens colorTokens, int width, int height, int orientation, boolean hasShadow, int maxGradLengthStart, int maxGradLengthEnd, boolean toEnforceAlphaColors) -
paintVerticalLines
public static void paintVerticalLines(Graphics g, Component c, ContainerColorTokens tokens, int y, Collection<Integer> x, int height, float fadeStartFraction) -
paintHorizontalLines
public static void paintHorizontalLines(Graphics g, Component c, ContainerColorTokens tokens, int x, Collection<Integer> y, int width, float fadeStartFraction, boolean isLtr)
-