Package com.github.tadukoo.view.border
Class ShapedLineBorder
java.lang.Object
javax.swing.border.AbstractBorder
com.github.tadukoo.view.border.ShapedLineBorder
- All Implemented Interfaces:
Serializable
,Border
Shaped Line Border mimics the functionality of a
LineBorder
, but uses the
ShapeInfo
(if present) on the component to draw the border, rather than making a rectangular border, or
it can have its own ShapeInfo
if desired.- Since:
- Alpha v.0.2
- Version:
- Alpha v.0.2.1
- Author:
- Logan Ferree (Tadukoo)
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Shaped Line Border Builder is used to create aShapedLineBorder
. -
Field Summary
Modifier and TypeFieldDescriptionprivate final SizablePaint
TheSizablePaint
to use on this Borderprivate final ShapeInfo
TheShapeInfo
to use on this Border (may be null to use the component's shape)private final int
The thickness of the line -
Constructor Summary
ModifierConstructorDescriptionprivate
ShapedLineBorder
(ShapeInfo shapeInfo, SizablePaint paint, int thickness) Constructs a new ShapedLineBorder with the given parameters -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
getBorderInsets
(Component c, Insets insets) void
paintBorder
(Component c, Graphics g, int x, int y, int w, int h) Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
-
Field Details
-
shapeInfo
TheShapeInfo
to use on this Border (may be null to use the component's shape) -
paint
TheSizablePaint
to use on this Border -
thickness
private final int thicknessThe thickness of the line
-
-
Constructor Details
-
ShapedLineBorder
Constructs a new ShapedLineBorder with the given parameters- Parameters:
shapeInfo
- TheShapeInfo
to use on this Border (may be null to use the component's shape)paint
- TheSizablePaint
to use on this Borderthickness
- The thickness of the line
-
-
Method Details
-
builder
- Returns:
- A
builder
to create aShapedLineBorder
-
getBorderInsets
- Specified by:
getBorderInsets
in interfaceBorder
- Overrides:
getBorderInsets
in classAbstractBorder
-
getBorderInsets
- Overrides:
getBorderInsets
in classAbstractBorder
-
paintBorder
- Specified by:
paintBorder
in interfaceBorder
- Overrides:
paintBorder
in classAbstractBorder
-