org.jhotdraw.samples.odg
Class ODGAttributeKeys
- java.lang.Object
-
- org.jhotdraw.draw.AttributeKeys
-
- org.jhotdraw.samples.odg.ODGAttributeKeys
-
public class ODGAttributeKeys extends AttributeKeys
ODGAttributeKeys.The descriptions of the attributes have been taken from the Open Document Specification version 1.1. http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.pdf
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jhotdraw.draw.AttributeKeys
AttributeKeys.Alignment, AttributeKeys.Orientation, AttributeKeys.StrokePlacement, AttributeKeys.StrokeType, AttributeKeys.Underfill, AttributeKeys.WindingRule
-
-
Field Summary
Fields Modifier and Type Field and Description static AttributeKey<Gradient>FILL_GRADIENTSpecifies the fill gradient of a ODG figure.static AttributeKey<java.lang.Double>FILL_OPACITYSpecifies the fill opacity of a ODG figure.static AttributeKey<ODGConstants.FillStyle>FILL_STYLESpecifies the fill style of a ODG figure.static AttributeKey<java.lang.String>NAMEThe attribute draw:name assigns a name to the drawing shape.static AttributeKey<java.lang.Double>OPACITYSpecifies the overall opacity of a ODG figure.static AttributeKey<Gradient>STROKE_GRADIENTSpecifies the stroke gradient of a ODG figure.static AttributeKey<java.lang.Double>STROKE_OPACITYSpecifies the stroke opacity of a ODG figure.static AttributeKey<ODGConstants.StrokeStyle>STROKE_STYLESpecifies the stroke style of a ODG figure.-
Fields inherited from class org.jhotdraw.draw.AttributeKeys
BEZIER_PATH_LAYOUTER, CANVAS_FILL_COLOR, CANVAS_FILL_OPACITY, CANVAS_HEIGHT, CANVAS_WIDTH, CHILD_ALIGNMENT, COMPOSITE_ALIGNMENT, DECORATOR_INSETS, END_DECORATION, FILL_COLOR, FILL_UNDER_STROKE, FONT_BOLD, FONT_FACE, FONT_ITALIC, FONT_SIZE, FONT_UNDERLINE, IS_STROKE_DASH_FACTOR, IS_STROKE_MITER_LIMIT_FACTOR, LAYOUT_INSETS, ORIENTATION, PATH_CLOSED, START_DECORATION, STROKE_CAP, STROKE_COLOR, STROKE_DASH_PHASE, STROKE_DASHES, STROKE_INNER_WIDTH_FACTOR, STROKE_JOIN, STROKE_MITER_LIMIT, STROKE_PLACEMENT, STROKE_TYPE, STROKE_WIDTH, supportedAttributeMap, supportedAttributes, TEXT, TEXT_ALIGNMENT, TEXT_COLOR, TEXT_SHADOW_COLOR, TEXT_SHADOW_OFFSET, TRANSFORM, UNCLOSED_PATH_FILLED, WINDING_RULE
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static java.awt.PaintgetFillPaint(Figure f)Gets the fill paint for the specified figure based on the attributes FILL_GRADIENT, FILL_OPACITY, FILL_PAINT and the bounds of the figure.static java.awt.StrokegetStroke(Figure f)static java.awt.PaintgetStrokePaint(Figure f)Gets the stroke paint for the specified figure based on the attributes STROKE_GRADIENT, STROKE_OPACITY, STROKE_PAINT and the bounds of the figure.static voidsetDefaults(Figure f)Sets ODG default values.-
Methods inherited from class org.jhotdraw.draw.AttributeKeys
getFont, getFontStyle, getHitStroke, getPerpendicularDrawGrowth, getPerpendicularFillGrowth, getPerpendicularHitGrowth, getStrokeTotalMiterLimit, getStrokeTotalWidth
-
-
-
-
Field Detail
-
NAME
public static final AttributeKey<java.lang.String> NAME
The attribute draw:name assigns a name to the drawing shape.
-
OPACITY
public static final AttributeKey<java.lang.Double> OPACITY
Specifies the overall opacity of a ODG figure. This is a value between 0 and 1 whereas 0 is translucent and 1 is fully opaque.
-
FILL_STYLE
public static final AttributeKey<ODGConstants.FillStyle> FILL_STYLE
Specifies the fill style of a ODG figure. The attribute draw:fill specifies the fill style for a graphic object. Graphic objects that are not closed, such as a path without a closepath at the end, will not be filled. The fill operation does not automatically close all open subpaths by connecting the last point of the subpath with the first point of the subpath before painting the fill. The attribute has the following values: • none: the drawing object is not filled. • solid: the drawing object is filled with color specified by the draw:fill-color attribute. • bitmap: the drawing object is filled with the bitmap specified by the draw:fill-image- name attribute. • gradient: the drawing object is filled with the gradient specified by the draw:fill- gradient-name attribute. • hatch: the drawing object is filled with the hatch specified by the draw:fill-hatch-name attribute.
-
FILL_GRADIENT
public static final AttributeKey<Gradient> FILL_GRADIENT
Specifies the fill gradient of a ODG figure.
-
FILL_OPACITY
public static final AttributeKey<java.lang.Double> FILL_OPACITY
Specifies the fill opacity of a ODG figure. This is a value between 0 and 1 whereas 0 is translucent and 1 is fully opaque.
-
STROKE_STYLE
public static final AttributeKey<ODGConstants.StrokeStyle> STROKE_STYLE
Specifies the stroke style of a ODG figure. The attribute draw:stroke specifies the style of the stroke on the current object. The value none means that no stroke is drawn, and the value solid means that a solid stroke is drawn. If the value is dash, the stroke referenced by the draw:stroke-dash property is drawn.
-
STROKE_GRADIENT
public static final AttributeKey<Gradient> STROKE_GRADIENT
Specifies the stroke gradient of a ODG figure.
-
STROKE_OPACITY
public static final AttributeKey<java.lang.Double> STROKE_OPACITY
Specifies the stroke opacity of a ODG figure. This is a value between 0 and 1 whereas 0 is translucent and 1 is fully opaque.
-
-
Method Detail
-
getFillPaint
@Nullable public static java.awt.Paint getFillPaint(Figure f)
Gets the fill paint for the specified figure based on the attributes FILL_GRADIENT, FILL_OPACITY, FILL_PAINT and the bounds of the figure. Returns null if the figure is not filled.
-
getStrokePaint
@Nullable public static java.awt.Paint getStrokePaint(Figure f)
Gets the stroke paint for the specified figure based on the attributes STROKE_GRADIENT, STROKE_OPACITY, STROKE_PAINT and the bounds of the figure. Returns null if the figure is not filled.
-
getStroke
public static java.awt.Stroke getStroke(Figure f)
-
setDefaults
public static void setDefaults(Figure f)
Sets ODG default values.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG