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
Nested ClassesModifier and TypeClassDescriptionstatic classShaped Line Border Builder is used to create aShapedLineBorder. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SizablePaintTheSizablePaintto use on this Borderprivate final ShapeInfoTheShapeInfoto use on this Border (may be null to use the component's shape)private final intThe thickness of the line -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateShapedLineBorder(ShapeInfo shapeInfo, SizablePaint paint, int thickness) Constructs a new ShapedLineBorder with the given parameters -
Method Summary
Modifier and TypeMethodDescriptionbuilder()getBorderInsets(Component c, Insets insets) voidpaintBorder(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
TheShapeInfoto use on this Border (may be null to use the component's shape) -
paint
TheSizablePaintto 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- TheShapeInfoto use on this Border (may be null to use the component's shape)paint- TheSizablePaintto use on this Borderthickness- The thickness of the line
-
-
Method Details
-
builder
- Returns:
- A
builderto create aShapedLineBorder
-
getBorderInsets
- Specified by:
getBorderInsetsin interfaceBorder- Overrides:
getBorderInsetsin classAbstractBorder
-
getBorderInsets
- Overrides:
getBorderInsetsin classAbstractBorder
-
paintBorder
- Specified by:
paintBorderin interfaceBorder- Overrides:
paintBorderin classAbstractBorder
-