|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.styling.StrokeImpl
public class StrokeImpl
Provides a Java representation of the Stroke object in an SLD document. A stroke defines how a line is rendered.
Field Summary |
---|
Fields inherited from interface org.geotools.styling.Stroke |
---|
DEFAULT, NULL |
Constructor Summary | |
---|---|
protected |
StrokeImpl()
Creates a new instance of Stroke |
protected |
StrokeImpl(org.opengis.filter.FilterFactory factory)
|
Method Summary | |
---|---|
void |
accept(StyleVisitor visitor)
|
java.lang.Object |
accept(org.opengis.style.StyleVisitor visitor,
java.lang.Object data)
|
java.lang.Object |
clone()
Clone the StrokeImpl object. |
boolean |
equals(java.lang.Object oth)
Compares this stroke with another stroke for equality. |
org.opengis.filter.expression.Expression |
getColor()
This parameter gives the solid color that will be used for a stroke. The color value is RGB-encoded using two hexidecimal digits per primary-color component in the order Red, Green, Blue, prefixed with the hash (#) sign. |
java.awt.Color |
getColor(org.opengis.feature.simple.SimpleFeature feature)
This parameter gives the solid color that will be used for a stroke. The color value returned here as a Java Color object, this is a convinence method that goes above The default color is defined to be Color.BLACK Note: in CSS this parameter is just called Stroke and not Color. |
float[] |
getDashArray()
This parameter encodes the dash pattern as a series of floats. The first number gives the length in pixels of the dash to draw, the second gives the amount of space to leave, and this pattern repeats. If an odd number of values is given, then the pattern is expanded by repeating it twice to give an even number of values. |
org.opengis.filter.expression.Expression |
getDashOffset()
This param determines where the dash pattern should start from. |
GraphicImpl |
getGraphicFill()
This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use. |
GraphicImpl |
getGraphicStroke()
This parameter indicates that a repeated-linear-graphic graphic stroke type will be used and specifies the graphic to use. |
org.opengis.filter.expression.Expression |
getLineCap()
This parameter controls how line strings should be capped. |
org.opengis.filter.expression.Expression |
getLineJoin()
This parameter controls how line strings should be joined together. |
org.opengis.filter.expression.Expression |
getOpacity()
This specifies the level of translucency to use when rendering the stroke. The value is encoded as a floating-point value between 0.0 and 1.0 with 0.0 representing totally transparent and 1.0 representing totally opaque. |
org.opengis.filter.expression.Expression |
getWidth()
This parameter gives the absolute width (thickness) of a stroke in pixels encoded as a float. |
int |
hashCode()
|
void |
setColor(org.opengis.filter.expression.Expression color)
This parameter sets the solid color that will be used for a stroke. The color value is RGB-encoded using two hexidecimal digits per primary-color component in the order Red, Green, Blue, prefixed with the hash (#) sign. |
void |
setColor(java.lang.String color)
This parameter sets the solid color that will be used for a stroke. The color value is RGB-encoded using two hexidecimal digits per primary-color component in the order Red, Green, Blue, prefixed with the hash (#) sign. |
void |
setDashArray(float[] dashPattern)
This parameter encodes the dash pattern as a series of floats. The first number gives the length in pixels of the dash to draw, the second gives the amount of space to leave, and this pattern repeats. If an odd number of values is given, then the pattern is expanded by repeating it twice to give an even number of values. |
void |
setDashOffset(org.opengis.filter.expression.Expression dashOffset)
This param determines where the dash pattern should start from. |
void |
setFilterFactory(org.opengis.filter.FilterFactory factory)
|
void |
setGraphicFill(org.opengis.style.Graphic fillGraphic)
This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use. |
void |
setGraphicStroke(org.opengis.style.Graphic strokeGraphic)
This parameter indicates that a repeated-linear-graphic graphic stroke type will be used and specifies the graphic to use. |
void |
setLineCap(org.opengis.filter.expression.Expression lineCap)
This parameter controls how line strings should be capped. |
void |
setLineJoin(org.opengis.filter.expression.Expression lineJoin)
This parameter controls how line strings should be joined together. |
void |
setOpacity(org.opengis.filter.expression.Expression opacity)
This specifies the level of translucency to use when rendering the stroke. The value is encoded as a floating-point value between 0.0 and 1.0 with 0.0 representing totally transparent and 1.0 representing totally opaque. |
void |
setWidth(org.opengis.filter.expression.Expression width)
This parameter sets the absolute width (thickness) of a stroke in pixels encoded as a float. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected StrokeImpl()
protected StrokeImpl(org.opengis.filter.FilterFactory factory)
Method Detail |
---|
public void setFilterFactory(org.opengis.filter.FilterFactory factory)
public org.opengis.filter.expression.Expression getColor()
getColor
in interface org.opengis.style.Stroke
public void setColor(org.opengis.filter.expression.Expression color)
color
- The color of the stroke encoded as a hexidecimal RGB value.
This must not be null.
java.lang.IllegalArgumentException
- DOCUMENT ME!public void setColor(java.lang.String color)
color
- The color of the stroke encoded as a hexidecimal RGB value.public float[] getDashArray()
-- --- -- --- --
--- -- --- -- --- --
getDashArray
in interface org.opengis.style.Stroke
public void setDashArray(float[] dashPattern)
-- --- -- ---
-- --- -- --- --
--- --
dashPattern
- The dash pattern as an array of float values in the
form "dashlength gaplength ..."public org.opengis.filter.expression.Expression getDashOffset()
getDashOffset
in interface org.opengis.style.Stroke
public void setDashOffset(org.opengis.filter.expression.Expression dashOffset)
dashOffset
- The distance into the dash pattern that should act as
the start.public GraphicImpl getGraphicFill()
getGraphicFill
in interface org.opengis.style.Stroke
public void setGraphicFill(org.opengis.style.Graphic fillGraphic)
fillGraphic
- The graphic to use as a stipple fill. If null, then
no Stipple fill should be used.public GraphicImpl getGraphicStroke()
getGraphicStroke
in interface org.opengis.style.Stroke
public void setGraphicStroke(org.opengis.style.Graphic strokeGraphic)
strokeGraphic
- The graphic to use as a linear graphic. If null,
then no graphic stroke should be used.public org.opengis.filter.expression.Expression getLineCap()
getLineCap
in interface org.opengis.style.Stroke
public void setLineCap(org.opengis.filter.expression.Expression lineCap)
lineCap
- The cap style. This can be one of "butt", "round" and
"square" There is no defined default.public org.opengis.filter.expression.Expression getLineJoin()
getLineJoin
in interface org.opengis.style.Stroke
public void setLineJoin(org.opengis.filter.expression.Expression lineJoin)
lineJoin
- The join style. This will be one of "mitre", "round"
and "bevel". There is no defined default.public org.opengis.filter.expression.Expression getOpacity()
getOpacity
in interface org.opengis.style.Stroke
public void setOpacity(org.opengis.filter.expression.Expression opacity)
opacity
- The opacity of the stroke, where 0.0 is completely
transparent and 1.0 is completely opaque.public org.opengis.filter.expression.Expression getWidth()
getWidth
in interface org.opengis.style.Stroke
public void setWidth(org.opengis.filter.expression.Expression width)
width
- The width of the stroke in pixels. This may be fractional
but not negative.public java.lang.String toString()
toString
in class java.lang.Object
public java.awt.Color getColor(org.opengis.feature.simple.SimpleFeature feature)
Stroke
public java.lang.Object accept(org.opengis.style.StyleVisitor visitor, java.lang.Object data)
accept
in interface org.opengis.style.Stroke
public void accept(StyleVisitor visitor)
public java.lang.Object clone()
The clone is a deep copy of the original, except for the expression values which are immutable.
clone
in class java.lang.Object
org.geotools.styling.Stroke#clone()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object oth)
equals
in class java.lang.Object
oth
- The other StrokeImpl to compare
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |