|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graphics.PrimitiveAttributes
The PrimitiveAttributes class provides the names for
the Attributes used within the graphics-package
and the needed methods to convert between constants and their
string-representation and vice versa.
| Nested Class Summary | |
static class |
PrimitiveAttributes.RasterWrapper
The RasterWrapper class is a simple wrapper for an instance
of Raster. |
| Field Summary | |
static java.lang.String |
ATTRIBUTENAME_ARC_HEIGHT
constant for a arc height attribute name |
static java.lang.String |
ATTRIBUTENAME_ARC_WIDTH
constant for a arc width attribute name |
static java.lang.String |
ATTRIBUTENAME_BACKCOLOR
constant for a colorback attribute name |
static java.lang.String |
ATTRIBUTENAME_BORDER
constant for a border attribute name |
static java.lang.String |
ATTRIBUTENAME_CLIPPING
constant for a clipping attribute name |
static java.lang.String |
ATTRIBUTENAME_COLOR
constant for a color attribute name |
static java.lang.String |
ATTRIBUTENAME_EDITABLE
constant for a editable attribute name |
static java.lang.String |
ATTRIBUTENAME_FIRSTWORDCHARACTERWRAP
constant for a first word charachter wrap attribute name |
static java.lang.String |
ATTRIBUTENAME_FONT
constant for a font attribute name |
static java.lang.String |
ATTRIBUTENAME_FONTFAMILY
constant for a font family attribute name |
static java.lang.String |
ATTRIBUTENAME_FONTSTRIKETHROUGH
constant for the strikethrough property of a font |
static java.lang.String |
ATTRIBUTENAME_FONTUNDERLINE
constant for the underline property of a font |
static java.lang.String |
ATTRIBUTENAME_FONTUNIT
constant for a scaled text attribute name |
static java.lang.String |
ATTRIBUTENAME_FORECOLOR
constant for a colorfore attribute name |
static java.lang.String |
ATTRIBUTENAME_GRADIENTTYPE
constant for a gradient type attribute name |
static java.lang.String |
ATTRIBUTENAME_HALIGN
constant for a horizontal alignment attribute name |
static java.lang.String |
ATTRIBUTENAME_KEEPFIRSTCHARACTER
constant for a keep first character attribute name |
static java.lang.String |
ATTRIBUTENAME_LINESHORTENING
constant for a line shortening attribute name |
static java.lang.String |
ATTRIBUTENAME_MARKERBEGIN
constant for a beginning marker attribute name |
static java.lang.String |
ATTRIBUTENAME_MARKEREND
constant for a ending marker attribute name |
static java.lang.String |
ATTRIBUTENAME_PAINT
constant for a paint attribute name |
static java.lang.String |
ATTRIBUTENAME_PATTERN
constant for a pattern attribute name |
static java.lang.String |
ATTRIBUTENAME_PATTERN_FORMAT
constant for a pattern attribute name |
static java.lang.String |
ATTRIBUTENAME_PATTERNTYPE
constant for a pattern type attribute name |
static java.lang.String |
ATTRIBUTENAME_ROUND_EDGES
constant for a round edges attribute name |
static java.lang.String |
ATTRIBUTENAME_SIZE
constant for a size attribute name |
static java.lang.String |
ATTRIBUTENAME_SIZEADJUSTMENT
constant for a size adjustment attribute name |
static java.lang.String |
ATTRIBUTENAME_STROKE
constant for a stroke attribute name |
static java.lang.String |
ATTRIBUTENAME_STYLE
constant for a style attribute name |
static java.lang.String |
ATTRIBUTENAME_TEXT
constant for a text attribute name |
static java.lang.String |
ATTRIBUTENAME_TEXT_BACKGROUND_PAINT
constant for a text attribute name |
static java.lang.String |
ATTRIBUTENAME_TRANSPARENCY
constant for a transparency attribute name |
static java.lang.String |
ATTRIBUTENAME_TRANSPARENT
constant for a transparent attribute name |
static java.lang.String |
ATTRIBUTENAME_VALIGN
constant for a vertical alignment attribute name |
static java.lang.String |
ATTRIBUTENAME_WEIGHT
constant for a weight attribute name |
static java.lang.String |
ATTRIBUTENAME_WORDWRAP
constant for a word wrap attribute name |
static char[] |
invalidFontNameCharacter
constant for the characters that are not allowed in font family names |
| Method Summary | |
static int |
alignmentToConstant(java.lang.String alignvalue)
Returns the corresponding int for the given textual
alignment value. |
static java.lang.String |
alignmentToString(int alignvalue)
Returns an string representation for the given alignment value. |
static FontFormat |
createFontFromAttributesTree(FontFormat font,
AttributeSet attributes)
Returns a newly created FontFormat that consists of the
attributes given through attributes. |
static MarkerFormat |
createMarkerFromAttributesTree(MarkerFormat marker,
AttributeSet attributes)
Returns a newly created MarkerFormat that consists of the
attributes given through attributes. |
static PaintFormat |
createPaintFromAttributesTree(PaintFormat paint,
AttributeSet attributes)
Returns a newly created PaintFormat that consists of the
attributes given through attributes. |
static StrokeFormat |
createStrokeFromAttributesTree(StrokeFormat stroke,
AttributeSet attributes)
Returns a newly created StrokeFormat that consists of the
attributes given through attributes. |
static java.lang.String |
fontStyleToString(boolean bold,
boolean italic)
Converts the font style given by the flags bold and
italic into a string representation. |
static int |
fontUnitToConstant(java.lang.String fontunit)
Returns the corresponding int for the given textual
sizement value. |
static java.lang.String |
fontUnitToString(int fontunit)
Returns an textual representation for the given font unit value. |
static AttributeSet |
getFontAttributesTree(FontFormat font,
boolean immutable)
Returns an AttributeSet that contains the
Attributes of the FontFormat given by
font.
|
static Constraint |
getFontFamilyConstraint()
Returns a Constraint that can be used with a font family
Attribute. |
static Constraint |
getFontStyleConstraint()
Returns a Constraint that can be used with a font style
Attribute. |
static Constraint |
getFontUnitConstraint()
Returns the Constraint instance that should be use for the
font unit attribute. |
static Constraint |
getGradientTypeConstraint()
Returns a Constraint that can be used with a gradient type
Attribute. |
static Constraint |
getHAlignmentConstraint()
Returns the Constraint instance that should be use for the
horizontal alignment attribute. |
static AttributeSet |
getMarkerAttributesTree(MarkerFormat marker,
boolean immutable)
Returns an AttributeSet that contains the
Attributes of the MarkerFormat given by
marker.
|
static Constraint |
getMarkerStyleConstraint()
Returns the Constraint instance that should be use for the
marker style attribute. |
static AttributeSet |
getPaintAttributesTree(PaintFormat paint,
boolean immutable)
Returns an AttributeSet that contains the
Attributes of the PaintFormat given by
paint.
|
static Constraint |
getPaintStyleConstraint()
Returns a Constraint that can be used with a paint style
Attribute. |
static Constraint |
getPatternTypeConstraint()
Returns a Constraint that can be used with a pattern type
Attribute. |
static Constraint |
getRectangleArcConstraint()
Returns a Constraint that can be used with a arc-width and
arc-height Attribute of a Rect2D. |
static Constraint |
getSizeAdjustmentConstraint()
Returns the Constraint instance that should be use for the
size adjustment attribute. |
static AttributeSet |
getStrokeAttributesTree(StrokeFormat stroke,
boolean immutable)
Returns an AttributeSet that contains the
Attributes of the StrokeFormat given by
stroke.
|
static Constraint |
getStrokePatternConstraint()
Returns a Constraint that can be used with a stroke weight
Attribute. |
static Constraint |
getStrokeStyleConstraint()
Returns a Constraint that can be used with a stroke style
Attribute. |
static Constraint |
getStrokeWeightConstraint()
Returns a Constraint that can be used with a stroke weight
Attribute. |
static Constraint |
getTextureConstraint()
Returns a Constraint that can be used with a paint style
Attribute. |
static Constraint |
getTransparencyConstraint()
Returns a Constraint that can be used with a transparency
Attribute. |
static Constraint |
getVAlignmentConstraint()
Returns the Constraint instance that should be use for the
vertical alignment attribute. |
static int |
gradientTypeToConstant(java.lang.String type)
Converts the gradient type string representation given by type into the corresponding constant. |
static java.lang.String |
gradientTypeToString(int type)
Converts the gradient type given by type from the constant
into a string representation. |
static boolean |
isFontStyleBold(java.lang.String style)
Returns a boolean that indicates whether the given font
style is bold or not. |
static boolean |
isFontStyleItalic(java.lang.String style)
Returns a boolean that indicates whether the given font
style is italic or not. |
static int |
markerStyleToConstant(java.lang.String style)
Converts the marker style string representation given by style into the corresponding constant. |
static java.lang.String |
markerStyleToString(int style)
Returns an string representation for the given marker style. |
static int |
paintStyleToConstant(java.lang.String style)
Converts the paint style string representation given by style into the corresponding constant. |
static java.lang.String |
paintStyleToString(int style)
Converts the paint style given by style from the constant
into a string representation. |
static int |
patternTypeToConstant(java.lang.String type)
Converts the pattern type string representation given by type into the corresponding constant. |
static java.lang.String |
patternTypeToString(int type)
Converts the pattern type given by type from the constant
into a string representation. |
static java.util.List |
removeInvalidFontnames(java.util.List fontnames)
Removes all those names from the list, which contain invalid or not supported characters. |
static int |
sizeAdjustmentToConstant(java.lang.String sizeAdjustment)
Returns the corresponding int for the given textual
sizement value. |
static java.lang.String |
sizeAdjustmentToString(int sizeAdjustment)
Returns an textual representation for the given sizement value. |
static int |
strokeStyleToConstant(java.lang.String style)
Converts the stroke style string representation given by style into the corresponding constant. |
static java.lang.String |
strokeStyleToString(int style)
Converts the stroke style given by style from the constant
into a string representation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String ATTRIBUTENAME_STROKE
public static final java.lang.String ATTRIBUTENAME_BORDER
public static final java.lang.String ATTRIBUTENAME_PAINT
public static final java.lang.String ATTRIBUTENAME_FONT
public static final java.lang.String ATTRIBUTENAME_MARKERBEGIN
public static final java.lang.String ATTRIBUTENAME_MARKEREND
public static final java.lang.String ATTRIBUTENAME_ROUND_EDGES
public static final java.lang.String ATTRIBUTENAME_ARC_WIDTH
public static final java.lang.String ATTRIBUTENAME_ARC_HEIGHT
public static final java.lang.String ATTRIBUTENAME_TEXT
public static final java.lang.String ATTRIBUTENAME_TEXT_BACKGROUND_PAINT
public static final java.lang.String ATTRIBUTENAME_EDITABLE
public static final java.lang.String ATTRIBUTENAME_HALIGN
public static final java.lang.String ATTRIBUTENAME_VALIGN
public static final java.lang.String ATTRIBUTENAME_SIZEADJUSTMENT
public static final java.lang.String ATTRIBUTENAME_CLIPPING
public static final java.lang.String ATTRIBUTENAME_LINESHORTENING
public static final java.lang.String ATTRIBUTENAME_KEEPFIRSTCHARACTER
public static final java.lang.String ATTRIBUTENAME_WORDWRAP
public static final java.lang.String ATTRIBUTENAME_FIRSTWORDCHARACTERWRAP
public static final java.lang.String ATTRIBUTENAME_FONTUNIT
public static final java.lang.String ATTRIBUTENAME_FONTUNDERLINE
public static final java.lang.String ATTRIBUTENAME_FONTSTRIKETHROUGH
public static final java.lang.String ATTRIBUTENAME_STYLE
public static final java.lang.String ATTRIBUTENAME_COLOR
public static final java.lang.String ATTRIBUTENAME_FORECOLOR
public static final java.lang.String ATTRIBUTENAME_BACKCOLOR
public static final java.lang.String ATTRIBUTENAME_WEIGHT
public static final java.lang.String ATTRIBUTENAME_PATTERN
public static final java.lang.String ATTRIBUTENAME_PATTERN_FORMAT
public static final java.lang.String ATTRIBUTENAME_GRADIENTTYPE
public static final java.lang.String ATTRIBUTENAME_PATTERNTYPE
public static final java.lang.String ATTRIBUTENAME_TRANSPARENT
public static final java.lang.String ATTRIBUTENAME_TRANSPARENCY
public static final java.lang.String ATTRIBUTENAME_FONTFAMILY
public static final java.lang.String ATTRIBUTENAME_SIZE
public static final char[] invalidFontNameCharacter
| Method Detail |
public static final Constraint getStrokeStyleConstraint()
Constraint that can be used with a stroke style
Attribute.
Attributepublic static final java.lang.String strokeStyleToString(int style)
style from the constant
into a string representation.
style - the stroke style constant to convert
public static final int strokeStyleToConstant(java.lang.String style)
style into the corresponding constant.
style - the string representation of a stroke style to convert
public static final Constraint getStrokeWeightConstraint()
Constraint that can be used with a stroke weight
Attribute.
Attributepublic static final Constraint getStrokePatternConstraint()
Constraint that can be used with a stroke weight
Attribute.
Attributepublic static final Constraint getPaintStyleConstraint()
Constraint that can be used with a paint style
Attribute.
Attributepublic static final Constraint getTextureConstraint()
Constraint that can be used with a paint style
Attribute.
Attributepublic static final java.lang.String paintStyleToString(int style)
style from the constant
into a string representation.
style - the paint style constant to convert
public static final int paintStyleToConstant(java.lang.String style)
style into the corresponding constant.
style - the string representation of a paint style to convert
public static final Constraint getGradientTypeConstraint()
Constraint that can be used with a gradient type
Attribute.
Attributepublic static final java.lang.String gradientTypeToString(int type)
type from the constant
into a string representation.
type - the gradient type constant to convert
public static final int gradientTypeToConstant(java.lang.String type)
type into the corresponding constant.
type - the string representation of a gradient type to convert
public static final Constraint getPatternTypeConstraint()
Constraint that can be used with a pattern type
Attribute.
Attributepublic static final java.lang.String patternTypeToString(int type)
type from the constant
into a string representation.
type - the pattern type constant to convert
public static final int patternTypeToConstant(java.lang.String type)
type into the corresponding constant.
type - the string representation of a pattern type to convert
public static final Constraint getTransparencyConstraint()
Constraint that can be used with a transparency
Attribute.
Attributepublic static final Constraint getFontFamilyConstraint()
Constraint that can be used with a font family
Attribute.
Attributepublic static final Constraint getFontStyleConstraint()
Constraint that can be used with a font style
Attribute.
Attribute
public static final java.lang.String fontStyleToString(boolean bold,
boolean italic)
bold and
italic into a string representation.
bold - flag that indicates whether the font is bolditalic - flag that indicates whether the font is italic
public static final boolean isFontStyleBold(java.lang.String style)
boolean that indicates whether the given font
style is bold or not.
style - the font style to check
public static final boolean isFontStyleItalic(java.lang.String style)
boolean that indicates whether the given font
style is italic or not.
style - the font style to check
public static final Constraint getMarkerStyleConstraint()
Constraint instance that should be use for the
marker style attribute.
Constraint instance for the
marker style attributepublic static final java.lang.String markerStyleToString(int style)
style - the marker style constant
public static final int markerStyleToConstant(java.lang.String style)
style into the corresponding constant.
style - the string representation of a marker style to convert
public static final Constraint getRectangleArcConstraint()
Constraint that can be used with a arc-width and
arc-height Attribute of a Rect2D.
Attribute of a Rect2Dpublic static final Constraint getHAlignmentConstraint()
Constraint instance that should be use for the
horizontal alignment attribute.
Constraint instance for the
horizontal alignment attributepublic static final Constraint getVAlignmentConstraint()
Constraint instance that should be use for the
vertical alignment attribute.
Constraint instance for the
vertical alignment attributepublic static final java.lang.String alignmentToString(int alignvalue)
alignvalue - the alignment constant.
String.public static final int alignmentToConstant(java.lang.String alignvalue)
int for the given textual
alignment value.
alignvalue - the textual alignment value.
int.public static final Constraint getSizeAdjustmentConstraint()
Constraint instance that should be use for the
size adjustment attribute.
Constraint instance for the
size adjustment attributepublic static final java.lang.String sizeAdjustmentToString(int sizeAdjustment)
String.public static final int sizeAdjustmentToConstant(java.lang.String sizeAdjustment)
int for the given textual
sizement value.
int.public static final Constraint getFontUnitConstraint()
Constraint instance that should be use for the
font unit attribute.
Constraint instance for the
font unit attributepublic static final java.lang.String fontUnitToString(int fontunit)
fontunit - the font unit constant.
String.public static final int fontUnitToConstant(java.lang.String fontunit)
int for the given textual
sizement value.
int.
public static final AttributeSet getStrokeAttributesTree(StrokeFormat stroke,
boolean immutable)
Returns an AttributeSet that contains the
Attributes of the StrokeFormat given by
stroke.
Depending on the boolean given by immutable
the Attributes in the returned AttributeSet
are modifiable or not.
stroke - the StrokeFormat to return the
attributes forimmutable - flag that indicates whether the Attributes
in the returned AttributeSet should be immutable or not
Attributes of the
StrokeFormat
public static final StrokeFormat createStrokeFromAttributesTree(StrokeFormat stroke,
AttributeSet attributes)
StrokeFormat that consists of the
attributes given through attributes.
stroke - the original stroke formatattributes - the attributes for the StrokeFormat
to create
StrokeFormat or
null
public static final AttributeSet getPaintAttributesTree(PaintFormat paint,
boolean immutable)
Returns an AttributeSet that contains the
Attributes of the PaintFormat given by
paint.
Depending on the boolean given by immutable
the Attributes in the returned AttributeSet
are modifiable or not.
paint - the PaintFormat to return the
attributes forimmutable - flag that indicates whether the Attributes
in the returned AttributeSet should be immutable or not
Attributes of the
PaintFormat
public static final PaintFormat createPaintFromAttributesTree(PaintFormat paint,
AttributeSet attributes)
PaintFormat that consists of the
attributes given through attributes.
paint - the original paint formatattributes - the attributes for the PaintFormat
to create
PaintFormat or
null
public static final AttributeSet getFontAttributesTree(FontFormat font,
boolean immutable)
Returns an AttributeSet that contains the
Attributes of the FontFormat given by
font.
Depending on the boolean given by immutable
the Attributes in the returned AttributeSet
are modifiable or not.
font - the FontFormat to return the
attributes forimmutable - flag that indicates whether the Attributes
in the returned AttributeSet should be immutable or not
Attributes of the
FontFormat
public static final FontFormat createFontFromAttributesTree(FontFormat font,
AttributeSet attributes)
FontFormat that consists of the
attributes given through attributes.
attributes - the attributes for the FontFormat
to create
FontFormat or
null
public static final AttributeSet getMarkerAttributesTree(MarkerFormat marker,
boolean immutable)
Returns an AttributeSet that contains the
Attributes of the MarkerFormat given by
marker.
Depending on the boolean given by immutable
the Attributes in the returned AttributeSet
are modifiable or not.
marker - the MarkerFormat to return the
attributes forimmutable - flag that indicates whether the Attributes
in the returned AttributeSet should be immutable or not
Attributes of the
MarkerFormat
public static final MarkerFormat createMarkerFromAttributesTree(MarkerFormat marker,
AttributeSet attributes)
MarkerFormat that consists of the
attributes given through attributes.
attributes - the attributes for the MarkerFormat
to create
MarkerFormat or
nullpublic static final java.util.List removeInvalidFontnames(java.util.List fontnames)
fontnames - list of font names.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||