| |
|
| java.lang.Object org.jfree.report.util.StrokeUtility
StrokeUtility | public class StrokeUtility (Code) | | This class provides helper methods to work with Strokes and line-styles.
author: Thomas Morgner |
Field Summary | |
final public static int | STROKE_DASHED A constant defining a stroke-type. | final public static int | STROKE_DOTTED A constant defining a stroke-type. | final public static int | STROKE_DOT_DASH A constant defining a stroke-type. | final public static int | STROKE_DOT_DOT_DASH A constant defining a stroke-type. | final public static int | STROKE_NONE A constant defining a stroke-type. | final public static int | STROKE_SOLID A constant defining a stroke-type. |
Method Summary | |
public static Stroke | createStroke(int type, float width) Creates a new Stroke-Object for the given type and with.
Parameters: type - the stroke-type. | public static int | getStrokeType(Stroke s) Tries to deduct the stroke-type from the given stroke object. | public static float | getStrokeWidth(Stroke s) Tries to extract the stroke-width from the given stroke object.
Parameters: s - the stroke. |
STROKE_DASHED | final public static int STROKE_DASHED(Code) | | A constant defining a stroke-type.
|
STROKE_DOTTED | final public static int STROKE_DOTTED(Code) | | A constant defining a stroke-type.
|
STROKE_DOT_DASH | final public static int STROKE_DOT_DASH(Code) | | A constant defining a stroke-type.
|
STROKE_DOT_DOT_DASH | final public static int STROKE_DOT_DOT_DASH(Code) | | A constant defining a stroke-type.
|
STROKE_NONE | final public static int STROKE_NONE(Code) | | A constant defining a stroke-type.
|
STROKE_SOLID | final public static int STROKE_SOLID(Code) | | A constant defining a stroke-type.
|
createStroke | public static Stroke createStroke(int type, float width)(Code) | | Creates a new Stroke-Object for the given type and with.
Parameters: type - the stroke-type. (Must be one of the constants defined in this class.) Parameters: width - the stroke's width. the stroke, never null. |
getStrokeType | public static int getStrokeType(Stroke s)(Code) | | Tries to deduct the stroke-type from the given stroke object. This will result in funny return values if the
stroke was not created by the
StrokeUtility.createStroke(int,float) method.
Parameters: s - the stroke. the stroke's width. |
getStrokeWidth | public static float getStrokeWidth(Stroke s)(Code) | | Tries to extract the stroke-width from the given stroke object.
Parameters: s - the stroke. the stroke's width. |
|
|
|