public class StrokeUtility extends Object
Modifier and Type | Field and Description |
---|---|
static int |
STROKE_DASHED
A constant defining a stroke-type.
|
static int |
STROKE_DOT_DASH
A constant defining a stroke-type.
|
static int |
STROKE_DOT_DOT_DASH
A constant defining a stroke-type.
|
static int |
STROKE_DOTTED
A constant defining a stroke-type.
|
static int |
STROKE_NONE
A constant defining a stroke-type.
|
static int |
STROKE_SOLID
A constant defining a stroke-type.
|
Modifier and Type | Method and Description |
---|---|
static Stroke |
createStroke(int type,
float width)
Creates a new Stroke-Object for the given type and with.
|
static int |
getStrokeType(Stroke s)
Tries to deduct the stroke-type from the given stroke object.
|
static float |
getStrokeWidth(Stroke s)
Tries to extract the stroke-width from the given stroke object.
|
static BorderStyle |
translateStrokeStyle(Stroke s) |
public static final int STROKE_SOLID
public static final int STROKE_DASHED
public static final int STROKE_DOTTED
public static final int STROKE_DOT_DASH
public static final int STROKE_DOT_DOT_DASH
public static final int STROKE_NONE
public static Stroke createStroke(int type, float width)
type
- the stroke-type. (Must be one of the constants defined in this class.)width
- the stroke's width.public static float getStrokeWidth(Stroke s)
s
- the stroke.public static int getStrokeType(Stroke s)
createStroke(int, float)
method.s
- the stroke.public static BorderStyle translateStrokeStyle(Stroke s)