public class AttributeKeys
extends java.lang.Object
Figure
attributes.
If you are developing an applications that uses a different put or an extended put of attributes, it is recommended to create a new AttributeKeys class, and to define all needed AttributeKeys as static variables in there.
Modifier and Type | Class and Description |
---|---|
static class |
AttributeKeys.Alignment |
static class |
AttributeKeys.Orientation |
static class |
AttributeKeys.StrokePlacement |
static class |
AttributeKeys.StrokeType |
static class |
AttributeKeys.Underfill |
static class |
AttributeKeys.WindingRule |
Modifier and Type | Field and Description |
---|---|
static AttributeKey<Liner> |
BEZIER_PATH_LAYOUTER
The value of this attribute is a Liner object.
|
static AttributeKey<java.awt.Color> |
CANVAS_FILL_COLOR
Canvas fill color.
|
static AttributeKey<java.lang.Double> |
CANVAS_FILL_OPACITY
Canvas fill opacity.
|
static AttributeKey<java.lang.Double> |
CANVAS_HEIGHT
The height of the canvas.
|
static AttributeKey<java.lang.Double> |
CANVAS_WIDTH
The width of the canvas.
|
static AttributeKey<AttributeKeys.Alignment> |
CHILD_ALIGNMENT
The value of this attribute is a Alignment object.
|
static AttributeKey<AttributeKeys.Alignment> |
COMPOSITE_ALIGNMENT
The value of this attribute is a Alignment object.
|
static AttributeKey<Insets2D.Double> |
DECORATOR_INSETS
The value of this attribute is a Insets2D.Double object.
|
static AttributeKey<LineDecoration> |
END_DECORATION |
static AttributeKey<java.awt.Color> |
FILL_COLOR
Figure fill color.
|
static AttributeKey<AttributeKeys.Underfill> |
FILL_UNDER_STROKE
Fill under stroke.
|
static AttributeKey<java.lang.Boolean> |
FONT_BOLD
The value of this attribute is a Boolean object.
|
static AttributeKey<java.awt.Font> |
FONT_FACE
The value of this attribute is a Font object, which is used as a prototype
to create the font for the text.
|
static AttributeKey<java.lang.Boolean> |
FONT_ITALIC
The value of this attribute is a Boolean object.
|
static AttributeKey<java.lang.Double> |
FONT_SIZE
The value of this attribute is a double object.
|
static AttributeKey<java.lang.Boolean> |
FONT_UNDERLINE
The value of this attribute is a Boolean object.
|
static AttributeKey<java.lang.Boolean> |
IS_STROKE_DASH_FACTOR
A boolean used to indicate whether STROKE_DASHES and STROKE_DASH_PHASE
shall be interpreted as factors of STROKE_WIDTH, or whether they are
absolute values.
|
static AttributeKey<java.lang.Boolean> |
IS_STROKE_MITER_LIMIT_FACTOR
A boolean used to indicate whether STROKE_MITER_LIMIT is a factor of
STROKE_WIDTH, or whether it represents an absolute value.
|
static AttributeKey<Insets2D.Double> |
LAYOUT_INSETS
The value of this attribute is a Insets2D.Double object.
|
static AttributeKey<AttributeKeys.Orientation> |
ORIENTATION
Specifies the orientation of a Figure.
|
static AttributeKey<java.lang.Boolean> |
PATH_CLOSED
Whether to path a BezierFigure is closed.
|
static AttributeKey<LineDecoration> |
START_DECORATION |
static AttributeKey<java.lang.Integer> |
STROKE_CAP
Stroke join.
|
static AttributeKey<java.awt.Color> |
STROKE_COLOR
Stroke color.
|
static AttributeKey<java.lang.Double> |
STROKE_DASH_PHASE
A double used to specify the starting phase of the stroke dashes.
|
static AttributeKey<double[]> |
STROKE_DASHES
An array of doubles used to specify the dash pattern in
a BasicStroke;
|
static AttributeKey<java.lang.Double> |
STROKE_INNER_WIDTH_FACTOR
Factor for the stroke inner width.
|
static AttributeKey<java.lang.Integer> |
STROKE_JOIN
Stroke join.
|
static AttributeKey<java.lang.Double> |
STROKE_MITER_LIMIT
Stroke miter limit factor.
|
static AttributeKey<AttributeKeys.StrokePlacement> |
STROKE_PLACEMENT
Stroke placement.
|
static AttributeKey<AttributeKeys.StrokeType> |
STROKE_TYPE
Stroke type.
|
static AttributeKey<java.lang.Double> |
STROKE_WIDTH
Stroke width.
|
static java.util.Map<java.lang.String,AttributeKey> |
supportedAttributeMap |
static java.util.Set<AttributeKey> |
supportedAttributes
A put with all attributes defined by this class.
|
static AttributeKey<java.lang.String> |
TEXT
The value of this attribute is a String object, which is used to
display the text of the figure.
|
static AttributeKey<AttributeKeys.Alignment> |
TEXT_ALIGNMENT
Text alignment.
|
static AttributeKey<java.awt.Color> |
TEXT_COLOR
Text color.
|
static AttributeKey<java.awt.Color> |
TEXT_SHADOW_COLOR
Text shadow color.
|
static AttributeKey<Dimension2DDouble> |
TEXT_SHADOW_OFFSET
Text shadow offset.
|
static AttributeKey<java.awt.geom.AffineTransform> |
TRANSFORM
Specifies the transform of a Figure.
|
static AttributeKey<java.lang.Boolean> |
UNCLOSED_PATH_FILLED
Whether an unclosed path of a BezierFigure is filled.
|
static AttributeKey<AttributeKeys.WindingRule> |
WINDING_RULE
Fill under stroke.
|
Constructor and Description |
---|
AttributeKeys() |
Modifier and Type | Method and Description |
---|---|
static java.awt.Font |
getFont(Figure f) |
static int |
getFontStyle(Figure f) |
static java.awt.Stroke |
getHitStroke(Figure f)
Returns a stroke which is useful for hit-testing.
|
static double |
getPerpendicularDrawGrowth(Figure f)
Returns the distance, that a Rectangle needs to grow (or shrink) to
draw (aka stroke) its shape as specified by the FILL_UNDER_STROKE and
STROKE_POSITION attributes of a figure.
|
static double |
getPerpendicularFillGrowth(Figure f)
Returns the distance, that a Rectangle needs to grow (or shrink) to
fill its shape as specified by the FILL_UNDER_STROKE and STROKE_POSITION
attributes of a figure.
|
static double |
getPerpendicularHitGrowth(Figure f)
Returns the distance, that a Rectangle needs to grow (or shrink) to
make hit detections on a shape as specified by the FILL_UNDER_STROKE and STROKE_POSITION
attributes of a figure.
|
static java.awt.Stroke |
getStroke(Figure f) |
static double |
getStrokeTotalMiterLimit(Figure f)
Convenience method for computing the total stroke miter limit from the
STROKE_MITER_LIMIT, and IS_STROKE_MITER_LIMIT factor.
|
static double |
getStrokeTotalWidth(Figure f)
Convenience method for computing the total stroke width from the
STROKE_WIDTH, STROKE_INNER_WIDTH and STROKE_TYPE attributes.
|
public static final AttributeKey<java.awt.Color> CANVAS_FILL_COLOR
public static final AttributeKey<java.lang.Double> CANVAS_FILL_OPACITY
public static final AttributeKey<java.lang.Double> CANVAS_WIDTH
public static final AttributeKey<java.lang.Double> CANVAS_HEIGHT
public static final AttributeKey<java.awt.Color> FILL_COLOR
public static final AttributeKey<java.lang.Boolean> PATH_CLOSED
public static final AttributeKey<java.lang.Boolean> UNCLOSED_PATH_FILLED
public static final AttributeKey<AttributeKeys.WindingRule> WINDING_RULE
public static final AttributeKey<AttributeKeys.Underfill> FILL_UNDER_STROKE
public static final AttributeKey<java.awt.Color> STROKE_COLOR
public static final AttributeKey<java.lang.Double> STROKE_WIDTH
public static final AttributeKey<java.lang.Double> STROKE_INNER_WIDTH_FACTOR
FIXME - This is not flexible enough. Lets replace this with a
STROKE_STRIPES_ARRAY
public static final AttributeKey<java.lang.Integer> STROKE_JOIN
public static final AttributeKey<java.lang.Integer> STROKE_CAP
public static final AttributeKey<java.lang.Double> STROKE_MITER_LIMIT
public static final AttributeKey<java.lang.Boolean> IS_STROKE_MITER_LIMIT_FACTOR
public static final AttributeKey<double[]> STROKE_DASHES
public static final AttributeKey<java.lang.Double> STROKE_DASH_PHASE
public static final AttributeKey<java.lang.Boolean> IS_STROKE_DASH_FACTOR
public static final AttributeKey<AttributeKeys.StrokeType> STROKE_TYPE
public static final AttributeKey<AttributeKeys.StrokePlacement> STROKE_PLACEMENT
The default value is StrokePlacement.CENTER.
public static final AttributeKey<java.lang.String> TEXT
public static final AttributeKey<java.awt.Color> TEXT_COLOR
public static final AttributeKey<java.awt.Color> TEXT_SHADOW_COLOR
public static final AttributeKey<Dimension2DDouble> TEXT_SHADOW_OFFSET
public static final AttributeKey<AttributeKeys.Alignment> TEXT_ALIGNMENT
public static final AttributeKey<java.awt.Font> FONT_FACE
public static final AttributeKey<java.lang.Double> FONT_SIZE
public static final AttributeKey<java.lang.Boolean> FONT_BOLD
public static final AttributeKey<java.lang.Boolean> FONT_ITALIC
public static final AttributeKey<java.lang.Boolean> FONT_UNDERLINE
public static final AttributeKey<Liner> BEZIER_PATH_LAYOUTER
public static final AttributeKey<LineDecoration> END_DECORATION
public static final AttributeKey<LineDecoration> START_DECORATION
public static final AttributeKey<Insets2D.Double> DECORATOR_INSETS
public static final AttributeKey<Insets2D.Double> LAYOUT_INSETS
This attribute can be put on a CompositeFigure, which uses a Layouter to lay out its children.
The insets are used to determine the insets between the bounds of the CompositeFigure and its children.
public static final AttributeKey<AttributeKeys.Alignment> COMPOSITE_ALIGNMENT
This attribute can be put on a CompositeFigure, which uses a Layouter to lay out its children.
The insets are used to determine the default alignment of the children of the CompositeFigure.
public static final AttributeKey<AttributeKeys.Alignment> CHILD_ALIGNMENT
This attribute can be put on a child of a CompositeFigure, which uses a Layouter to lay out its children.
Layouters should use this attribute, to determine the default alignment of the child figures contained in the CompositeFigure which they lay out.
public static final AttributeKey<java.awt.geom.AffineTransform> TRANSFORM
public static final AttributeKey<AttributeKeys.Orientation> ORIENTATION
public static final java.util.Set<AttributeKey> supportedAttributes
public static final java.util.Map<java.lang.String,AttributeKey> supportedAttributeMap
public static double getStrokeTotalWidth(Figure f)
public static double getStrokeTotalMiterLimit(Figure f)
public static java.awt.Stroke getStroke(Figure f)
public static java.awt.Stroke getHitStroke(Figure f)
f
- public static java.awt.Font getFont(Figure f)
public static int getFontStyle(Figure f)
public static double getPerpendicularFillGrowth(Figure f)
public static double getPerpendicularDrawGrowth(Figure f)
public static double getPerpendicularHitGrowth(Figure f)