Class SeparatorPainterUtils
java.lang.Object
org.pushingpixels.substance.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 Colorstatic voidpaintHorizontalLines(Graphics g, Component c, SubstanceColorScheme scheme, int x, Collection<Integer> y, int width, float fadeStartFraction, boolean isLtr) Paints horizontal separator lines.static voidpaintSeparator(Component c, Graphics graphics, int width, int height, int orientation) Paints a separator.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, SubstanceColorScheme scheme, int width, int height, int orientation, boolean hasShadow, int maxGradLengthStart, int maxGradLengthEnd, boolean toEnforceAlphaColors) Paints a separator.static voidpaintVerticalLines(Graphics g, Component c, SubstanceColorScheme scheme, int y, Collection<Integer> x, int height, float fadeStartFraction) Paints vertical separator lines.
-
Constructor Details
-
SeparatorPainterUtils
public SeparatorPainterUtils()
-
-
Method Details
-
paintSeparator
public static void paintSeparator(Component c, Graphics graphics, int width, int height, int orientation) Paints a separator.- Parameters:
c- 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.
-
paintSeparator
public static void paintSeparator(Component c, Graphics g, SubstanceColorScheme scheme, int width, int height, int orientation, boolean hasShadow, int maxGradLengthStart, int maxGradLengthEnd, boolean toEnforceAlphaColors) Paints a separator.- Parameters:
c- Component.g- Graphics context.scheme- Color scheme.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.
-
getSeparatorShadowColor
-
getSeparatorDarkColor
-
getSeparatorLightColor
-
paintVerticalLines
public static void paintVerticalLines(Graphics g, Component c, SubstanceColorScheme scheme, int y, Collection<Integer> x, int height, float fadeStartFraction) Paints vertical separator lines.- Parameters:
g- Graphics context.c- Component.scheme- Color scheme for painting the vertical separator lines.y- The top Y coordinate of the lines.x- The X coordinates of the lines.height- The height of the lines.fadeStartFraction- The start fraction of the fade out sequence.
-
paintHorizontalLines
public static void paintHorizontalLines(Graphics g, Component c, SubstanceColorScheme scheme, int x, Collection<Integer> y, int width, float fadeStartFraction, boolean isLtr) Paints horizontal separator lines.- Parameters:
g- Graphics context.c- Component.scheme- Color scheme for painting the horizontal separator lines.x- The left X coordinate of the lines.y- The Y coordinates of the lines.width- The width of the lines.fadeStartFraction- The start fraction of the fade out sequence.isLtr- Iftrue, the lines are left-to-right and the fade out is on the right side. Otherwise, the fade out is on the left side.
-