public class BorderPainter extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ALL |
static int |
BOTTOM |
static int |
LEFT |
static int |
RIGHT |
static int |
TOP |
| Constructor and Description |
|---|
BorderPainter() |
| Modifier and Type | Method and Description |
|---|---|
static Path2D |
generateBorderBounds(Rectangle bounds,
BorderPropertySet border,
boolean inside)
Generates a full round rectangle that is made of bounds and border
|
static Path2D |
generateBorderShape(Rectangle bounds,
int side,
BorderPropertySet border,
boolean drawInterior)
Generates one side of a border
|
static Path2D |
generateBorderShape(Rectangle bounds,
int side,
BorderPropertySet border,
boolean drawInterior,
float scaledOffset)
Generates one side of a border
|
static Path2D |
generateBorderShape(Rectangle bounds,
int side,
BorderPropertySet border,
boolean drawInterior,
float scaledOffset,
float widthScale)
Generates one side of a border
|
static void |
paint(Rectangle bounds,
int sides,
BorderPropertySet border,
RenderingContext ctx,
int xOffset,
boolean bevel) |
public static final int TOP
public static final int LEFT
public static final int BOTTOM
public static final int RIGHT
public static final int ALL
public static Path2D generateBorderBounds(Rectangle bounds, BorderPropertySet border, boolean inside)
bounds - Dimmensions of the rectborder - The border specsSet - true if you want the inner bounds of borderspublic static Path2D generateBorderShape(Rectangle bounds, int side, BorderPropertySet border, boolean drawInterior)
bounds - bounds of the containerside - what side you wantborder - border propsdrawInterior - if you want it to be 2d or not, if false it will be just a linepublic static Path2D generateBorderShape(Rectangle bounds, int side, BorderPropertySet border, boolean drawInterior, float scaledOffset)
bounds - bounds of the containerside - what side you wantborder - border propsdrawInterior - if you want it to be 2d or not, if false it will be just a linescaledOffset - insets the border by multipling border widths by this variable, best use would be 1 or .5, cant see it for much other than thatpublic static Path2D generateBorderShape(Rectangle bounds, int side, BorderPropertySet border, boolean drawInterior, float scaledOffset, float widthScale)
bounds - bounds of the containerside - what side you wantborder - border propsdrawInterior - if you want it to be 2d or not, if false it will be just a linescaledOffset - insets the border by multipling border widths by this variable, best use would be 1 or .5, cant see it for much other than thatwidthScale - scales the border widths by this factor, useful for drawing half borders for border types like groove or doublepublic static void paint(Rectangle bounds, int sides, BorderPropertySet border, RenderingContext ctx, int xOffset, boolean bevel)
xOffset - for determining starting point for patternsCopyright © 2017. All rights reserved.