public class ShapeAttributes extends java.lang.Object implements LineAttributes, FillAttributes
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FILL_COLOR_KEY
Configuration parameter key.
|
static java.lang.String |
LINE_COLOR_KEY
Configuration parameter key.
|
static java.lang.String |
LINE_PATTERN_KEY
Configuration parameter key.
|
static java.lang.String |
LINE_THICKNESS_KEY
Configuration parameter key.
|
| Constructor and Description |
|---|
ShapeAttributes(java.awt.Color fillColor,
java.awt.Color lineColor,
double lineThickness,
double[] linePattern)
Creates a new instance.
|
ShapeAttributes(ConfigParameters config)
Creates a new instance based on the specified configuration
parameters.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.Color |
getFillColor()
Returns the fill color.
|
java.awt.Color |
getLineColor()
Returns the line color.
|
double[] |
getLinePattern()
Returns the line pattern.
|
double |
getLineThickness()
Returns the line tickness.
|
public static final java.lang.String FILL_COLOR_KEY
public static final java.lang.String LINE_COLOR_KEY
public static final java.lang.String LINE_THICKNESS_KEY
public static final java.lang.String LINE_PATTERN_KEY
public ShapeAttributes(ConfigParameters config)
| Key & Default Value | Type | Mandatory | Description |
|---|---|---|---|
| fillColor = no filling | Color | no | The fill color of the shape. |
| lineColor = no line | Color | no | The color of a line, a polygon, or the border of a shape. |
| lineThickness = 0 | double | no | The thickness of a line. A thickness of zero means that the renderer will draw the thinest line possible. |
| linePattern = solid line | double[] | no | A sequence of lengths where the pen is alternatively down or up. For example, 0.1 0.1 will lead to a dashed line whereas 0.02 0.02 is the pattern of a dotted line and 0.02 0.02 0.1 0.02 of a dashed-dotted line. |
public ShapeAttributes(java.awt.Color fillColor,
java.awt.Color lineColor,
double lineThickness,
double[] linePattern)
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.public java.awt.Color getFillColor()
FillAttributesgetFillColor in interface FillAttributespublic java.awt.Color getLineColor()
LineAttributesgetLineColor in interface LineAttributespublic double getLineThickness()
LineAttributesgetLineThickness in interface LineAttributespublic double[] getLinePattern()
LineAttributesgetLinePattern in interface LineAttributes