org.geotools.styling
Class MarkImpl

java.lang.Object
  extended byorg.geotools.event.AbstractGTComponent
      extended byorg.geotools.styling.MarkImpl
All Implemented Interfaces:
java.lang.Cloneable, org.opengis.util.Cloneable, GTComponent, Mark, Symbol
Direct Known Subclasses:
TextMarkImpl

public class MarkImpl
extends AbstractGTComponent
implements Mark, org.opengis.util.Cloneable

DOCUMENT ME!

Version:
$Id: MarkImpl.java 18021 2006-02-14 20:36:18Z jdeolive $
Author:
Ian Turton, CCG

Field Summary
 
Fields inherited from class org.geotools.event.AbstractGTComponent
notification
 
Fields inherited from interface org.geotools.styling.Mark
MARKS_EMPTY
 
Fields inherited from interface org.geotools.styling.Symbol
SYMBOLS_EMPTY
 
Constructor Summary
protected MarkImpl()
          Creates a new instance of DefaultMark
  MarkImpl(java.lang.String name)
           
 
Method Summary
 void accept(StyleVisitor visitor)
           
 java.lang.Object clone()
          Creates a deep copy of the Mark.
 boolean equals(java.lang.Object oth)
          Compares this MarkImpl with another for equality.
 Fill 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.
 Stroke 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 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(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class org.geotools.event.AbstractGTComponent
changed, fireChanged, fireChildChanged, getNote, getParent, removed, setNote
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.geotools.event.GTComponent
changed, getNote, getParent, removed, setNote
 

Constructor Detail

MarkImpl

protected MarkImpl()
Creates a new instance of DefaultMark


MarkImpl

public MarkImpl(java.lang.String name)
Method Detail

getFill

public Fill 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 Stroke 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.

Specified by:
setFill in interface Mark
Parameters:
fill - New value of property fill.

setStroke

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

Specified by:
setStroke in interface Mark
Parameters:
stroke - New value of property stroke.

setSize

public void setSize(Expression size)
Specified by:
setSize in interface Mark

setSize

public void setSize(int size)

setWellKnownName

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

Specified by:
setWellKnownName in interface Mark
Parameters:
wellKnownName - New value of property wellKnownName.

setWellKnownName

public void setWellKnownName(java.lang.String name)

setRotation

public void setRotation(Expression rotation)
Specified by:
setRotation in interface Mark

setRotation

public void setRotation(double rotation)

getSize

public Expression getSize()
Getter for property size.

Specified by:
getSize in interface Mark
Returns:
Value of property size.

getRotation

public Expression getRotation()
Getter for property rotation.

Specified by:
getRotation in interface Mark
Returns:
Value of property rotation.

toString

public java.lang.String toString()

accept

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

clone

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

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

Specified by:
clone in interface org.opengis.util.Cloneable
Overrides:
clone in class AbstractGTComponent
See Also:
org.geotools.styling.Mark#clone()

hashCode

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

Returns:
the Hashcode.

equals

public boolean equals(java.lang.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.

Parameters:
oth - The Other MarkImpl to compare with.
Returns:
True if this and oth are equal.


Copyright © GeoTools. All Rights Reserved.