Package org.geotools.styling
Class MarkImpl
- Object
-
- MarkImpl
-
-
Field Summary
-
Fields inherited from interface GraphicalSymbol
SYMBOLS_EMPTY
-
Fields inherited from interface Mark
MARKS_EMPTY
-
Fields inherited from interface Symbol
SYMBOLS_EMPTY
-
-
Constructor Summary
Constructors Constructor Description MarkImpl()Creates a new instance of DefaultMarkMarkImpl(String name)MarkImpl(FilterFactory filterFactory, ExternalMark external)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(StyleVisitor visitor)calls the visit method of a StyleVisitorObjectaccept(TraversingStyleVisitor visitor, Object data)Objectclone()Creates a deep copy of the Mark.booleanequals(Object oth)Compares this MarkImpl with another for equality.ExternalMarkImplgetExternalMark()The alternative to a WellKnownName is an external mark format.FillImplgetFill()This parameter defines which fill style to use when rendering the Mark.StrokeImplgetStroke()This paramterer defines which stroke style should be used when rendering the Mark.ExpressiongetWellKnownName()This parameter gives the well-known name of the shape of the mark.
Allowed names include at least "square", "circle", "triangle", "star", "cross" and "x" though renderers may draw a different symbol instead if they don't have a shape for all of these.inthashCode()The hashcode override for the MarkImpl.voidsetExternalMark(ExternalMark external)Mark defined by an external resource.voidsetFill(Fill fill)Setter for property fill.voidsetStroke(Stroke stroke)Setter for property stroke.voidsetWellKnownName(String name)voidsetWellKnownName(Expression wellKnownName)Setter for property wellKnownName.StringtoString()
-
-
-
Constructor Detail
-
MarkImpl
public MarkImpl()
Creates a new instance of DefaultMark
-
MarkImpl
public MarkImpl(String name)
-
MarkImpl
public MarkImpl(FilterFactory filterFactory, ExternalMark external)
-
-
Method Detail
-
getFill
public FillImpl getFill()
This parameter defines which fill style to use when rendering the Mark.
-
getStroke
public StrokeImpl getStroke()
This paramterer defines which stroke style should be used when rendering the Mark.
-
getWellKnownName
public Expression getWellKnownName()
This parameter gives the well-known name of the shape of the mark.
Allowed names include at least "square", "circle", "triangle", "star", "cross" and "x" though renderers may draw a different symbol instead if they don't have a shape for all of these.- Specified by:
getWellKnownNamein interfaceMark- Returns:
- The well-known name of a shape. The default value is "square".
-
setFill
public void setFill(Fill fill)
Setter for property fill.
-
setStroke
public void setStroke(Stroke stroke)
Setter for property stroke.
-
setWellKnownName
public void setWellKnownName(Expression wellKnownName)
Setter for property wellKnownName.- Specified by:
setWellKnownNamein interfaceMark- Parameters:
wellKnownName- New value of property wellKnownName.
-
setWellKnownName
public void setWellKnownName(String name)
-
accept
public Object accept(TraversingStyleVisitor visitor, Object data)
-
accept
public void accept(StyleVisitor visitor)
Description copied from interface:Markcalls the visit method of a StyleVisitor
-
clone
public Object clone()
Creates a deep copy of the Mark.Only the fill and stroke are cloned since Expressions should be immutable.
-
hashCode
public int hashCode()
The hashcode override for the MarkImpl.
-
equals
public boolean equals(Object oth)
Compares this MarkImpl with another for equality.Two MarkImpls are equal if they have the same well Known Name, the same size and rotation and the same stroke and fill.
-
getExternalMark
public ExternalMarkImpl getExternalMark()
Description copied from interface:MarkThe alternative to a WellKnownName is an external mark format. SeeExternalMarkfor details.Both WellKnowName and ExternalMark cannot be set, but both can be null. If none are set then the default square symbol is used.
- Specified by:
getExternalMarkin interfaceMark- Returns:
- ExternalMark or null
-
setExternalMark
public void setExternalMark(ExternalMark external)
Description copied from interface:MarkMark defined by an external resource.- Specified by:
setExternalMarkin interfaceMark- Parameters:
external- Indicate an mark defined by an external resource
-
-