Package org.uncommons.swing
Class ConfigurableLineBorder
- java.lang.Object
-
- org.uncommons.swing.ConfigurableLineBorder
-
-
Constructor Summary
Constructors Constructor Description ConfigurableLineBorder(boolean top, boolean left, boolean bottom, boolean right, int thickness)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InsetsgetBorderInsets(Component component)booleanisBorderOpaque()voidpaintBorder(Component component, Graphics graphics, int x, int y, int width, int height)Renders borders for the specified component based on the configuration of this border object.
-
-
-
Constructor Detail
-
ConfigurableLineBorder
public ConfigurableLineBorder(boolean top, boolean left, boolean bottom, boolean right, int thickness)- Parameters:
top- Whether or not to draw the border on the top edge.left- Whether or not to draw the border on the left edge.bottom- Whether or not to draw the border on the bottom edge.right- Whether or not to draw the border on the right edge.thickness- The width (in pixels) of each side of the border.
-
-
Method Detail
-
paintBorder
public void paintBorder(Component component, Graphics graphics, int x, int y, int width, int height)
Renders borders for the specified component based on the configuration of this border object.- Specified by:
paintBorderin interfaceBorder- Parameters:
component- The component for which the border is painted.graphics- AGraphicsobject to use for painting.x- The X-coordinate of the top left point of the border rectangle.y- The Y-coordinate of the top left point of the border rectangle.width- The width of the border rectangle.height- The height of the border rectangle.
-
getBorderInsets
public Insets getBorderInsets(Component component)
- Specified by:
getBorderInsetsin interfaceBorder- Parameters:
component- The component for which the border is painted.- Returns:
- Insets for the current border configuration.
-
isBorderOpaque
public boolean isBorderOpaque()
- Specified by:
isBorderOpaquein interfaceBorder- Returns:
- false
-
-