org.geotools.styling
Class MarkImpl

Object
  extended by MarkImpl
All Implemented Interfaces:
Cloneable, Symbol, GraphicalSymbol, Mark
Direct Known Subclasses:
TextMarkImpl

public class MarkImpl
extends Object
implements Mark, Cloneable

Default implementation of Mark.

Author:
Ian Turton, CCG, Johann Sorel (Geomatys)
Module:
modules/library/main (gt-main.jar)

Field Summary
 
Fields inherited from interface Mark
MARKS_EMPTY
 
Fields inherited from interface Symbol
SYMBOLS_EMPTY
 
Constructor Summary
MarkImpl()
          Creates a new instance of DefaultMark
MarkImpl(FilterFactory filterFactory, ExternalMark external)
           
MarkImpl(String name)
           
 
Method Summary
 void accept(StyleVisitor visitor)
           
 Object accept(StyleVisitor visitor, Object data)
           
 Object clone()
          Creates a deep copy of the Mark.
 boolean equals(Object oth)
          Compares this MarkImpl with another for equality.
 ExternalMarkImpl getExternalMark()
           
 FillImpl getFill()
          This parameter defines which fill style to use when rendering the Mark.
 Expression getRotation()
          Getter for property rotation.
 Expression getSize()
          Getter for property size.
 StrokeImpl getStroke()
          This paramterer defines which stroke style should be used when rendering the Mark.
 Expression getWellKnownName()
          This parameter gives the well-known name of the shape of the mark.
 int hashCode()
          The hashcode override for the MarkImpl.
 void setExternalMark(ExternalMark external)
           
 void setFill(Fill fill)
          Setter for property fill.
 void setRotation(double rotation)
           
 void setRotation(Expression rotation)
           
 void setSize(Expression size)
           
 void setSize(int size)
           
 void setStroke(Stroke stroke)
          Setter for property stroke.
 void setWellKnownName(Expression wellKnownName)
          Setter for property wellKnownName.
 void setWellKnownName(String name)
           
 String toString()
           
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

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.

Specified by:
getFill in interface Mark
Returns:
the Fill definition to use when rendering the Mark.

getStroke

public StrokeImpl getStroke()
This paramterer defines which stroke style should be used when rendering the Mark.

Specified by:
getStroke in interface Mark
Returns:
The Stroke definition to use 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:
getWellKnownName in interface Mark
Returns:
The well-known name of a shape. The default value is "square".

setFill

public void setFill(Fill fill)
Setter for property fill.

Parameters:
fill - New value of property fill.

setStroke

public void setStroke(Stroke stroke)
Setter for property stroke.

Parameters:
stroke - New value of property stroke.

setSize

public void setSize(Expression size)

setSize

public void setSize(int size)

setWellKnownName

public void setWellKnownName(Expression wellKnownName)
Setter for property wellKnownName.

Parameters:
wellKnownName - New value of property wellKnownName.

setWellKnownName

public void setWellKnownName(String name)

setRotation

public void setRotation(Expression rotation)

setRotation

public void setRotation(double rotation)

getSize

public Expression getSize()
Getter for property size.

Returns:
Value of property size.

getRotation

public Expression getRotation()
Getter for property rotation.

Returns:
Value of property rotation.

toString

public String toString()
Overrides:
toString in class Object

accept

public Object accept(StyleVisitor visitor,
                     Object data)
Specified by:
accept in interface Mark

accept

public void accept(StyleVisitor visitor)
Specified by:
accept in interface Symbol

clone

public Object clone()
Creates a deep copy of the Mark.

Only the fill and stroke are cloned since Expressions should be immutable.

Overrides:
clone in class Object
See Also:
org.geotools.styling.Mark#clone()

hashCode

public int hashCode()
The hashcode override for the MarkImpl.

Overrides:
hashCode in class Object
Returns:
the Hashcode.

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.

Overrides:
equals in class Object
Parameters:
oth - The Other MarkImpl to compare with.
Returns:
True if this and oth are equal.

getExternalMark

public ExternalMarkImpl getExternalMark()
Specified by:
getExternalMark in interface Mark

setExternalMark

public void setExternalMark(ExternalMark external)


Copyright © 1996-2009 Geotools. All Rights Reserved.