|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcckit.graphic.ShapeAttributes jcckit.graphic.BasicGraphicAttributes
The basic attributes of any BasicGraphicalElement
. This is an
extension of ShapeAttributes
implementing TextAttributes
.
Field Summary | |
static java.lang.String |
FONT_NAME_KEY
Configuration parameter key. |
static java.lang.String |
FONT_SIZE_KEY
Configuration parameter key. |
static java.lang.String |
FONT_STYLE_KEY
Configuration parameter key. |
static java.lang.String |
HORIZONTAL_ANCHOR_KEY
Configuration parameter key. |
static java.lang.String |
ORIENTATION_ANGLE_KEY
Configuration parameter key. |
static java.lang.String |
TEXT_COLOR_KEY
Configuration parameter key. |
static java.lang.String |
VERTICAL_ANCHOR_KEY
Configuration parameter key. |
Fields inherited from class jcckit.graphic.ShapeAttributes |
FILL_COLOR_KEY, LINE_COLOR_KEY, LINE_PATTERN_KEY, LINE_THICKNESS_KEY |
Constructor Summary | |
BasicGraphicAttributes(java.awt.Color fillColor,
java.awt.Color lineColor,
double lineThickness,
double[] linePattern,
java.awt.Color textColor,
java.lang.String fontName,
FontStyle fontStyle,
double fontSize,
double orientationAngle,
Anchor horizontalAnchor,
Anchor verticalAnchor)
Creates a new instance. |
|
BasicGraphicAttributes(ConfigParameters config)
Creates a new instance based on the specified configuration parameters. |
Method Summary | |
java.lang.String |
getFontName()
Returns the font name. |
double |
getFontSize()
Returns the font size in units of the device-independent coordinates. |
FontStyle |
getFontStyle()
Returns the font style. |
Anchor |
getHorizontalAnchor()
Returns the anchor for horizontal position of the text. |
double |
getOrientationAngle()
Returns the orientation angle in degree. |
java.awt.Color |
getTextColor()
Returns the text color. |
Anchor |
getVerticalAnchor()
Returns the anchor for vertical position of the text. |
Methods inherited from class jcckit.graphic.ShapeAttributes |
getFillColor, getLineColor, getLinePattern, getLineThickness |
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 TEXT_COLOR_KEY
public static final java.lang.String FONT_NAME_KEY
public static final java.lang.String FONT_STYLE_KEY
public static final java.lang.String FONT_SIZE_KEY
public static final java.lang.String HORIZONTAL_ANCHOR_KEY
public static final java.lang.String VERTICAL_ANCHOR_KEY
public static final java.lang.String ORIENTATION_ANGLE_KEY
Constructor Detail |
public BasicGraphicAttributes(ConfigParameters config)
Key & Default Value | Type | Mandatory | Description |
---|---|---|---|
textColor = default foreground color of the renderer | Color | no | The text color. |
fontName = default font name of the renderer | String | no | The name of the text font. The standard Java font name
"Serif", "SansSerif", and "Monospaced" can be used.
Other font names depend on the actual Renderer
rendering the corresponding BasicGraphicalElement .
|
fontStyle = normal | String | no | The font style. Possible values are:
|
fontSize = default font size of the renderer | double | no | The font size in units of the device-independent coordinates. |
orientationAngle = 0 | double | no | The orientation angle of the text (in degree). Zero means normal orientation whereas a positive value means a rotation in counter-clockweise direction. |
horizontalAnchor = left | String | no | Anchor for horizontal text position. Possible values are left, center, and right. |
verticalAnchor = center | String | no | Anchor for vertical text position. Possible values are top, center, and bottom. |
constructor
of the superclass ShapeAttributes
.
public BasicGraphicAttributes(java.awt.Color fillColor, java.awt.Color lineColor, double lineThickness, double[] linePattern, java.awt.Color textColor, java.lang.String fontName, FontStyle fontStyle, double fontSize, double orientationAngle, Anchor horizontalAnchor, Anchor verticalAnchor)
fillColor
- The fill color. May be null.lineColor
- The line color. May be null.lineThickness
- Thickness of the line.
Negative numbers will be trimmed to zero.linePattern
- Line pattern. May be null.textColor
- The text color. May be null.fontName
- The font name. May be null.fontStyle
- The font style. May be null.fontSize
- The font size in units of the device-independent
coordinates. May be null.orientationAngle
- Orientation angle of the text.horizontalAnchor
- Horizontal text anchor.verticalAnchor
- Vertical text anchor.Method Detail |
public java.awt.Color getTextColor()
getTextColor
in interface TextAttributes
public java.lang.String getFontName()
getFontName
in interface TextAttributes
public FontStyle getFontStyle()
getFontStyle
in interface TextAttributes
public double getFontSize()
getFontSize
in interface TextAttributes
public double getOrientationAngle()
getOrientationAngle
in interface TextAttributes
public Anchor getHorizontalAnchor()
getHorizontalAnchor
in interface TextAttributes
public Anchor getVerticalAnchor()
getVerticalAnchor
in interface TextAttributes
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |