org.geotools.styling
Class StyleImpl

java.lang.Object
  extended byorg.geotools.event.AbstractGTComponent
      extended byorg.geotools.styling.StyleImpl
All Implemented Interfaces:
java.lang.Cloneable, org.opengis.util.Cloneable, GTComponent, Style
Direct Known Subclasses:
BasicLineStyle, BasicPolygonStyle

public class StyleImpl
extends AbstractGTComponent
implements Style, org.opengis.util.Cloneable

DOCUMENT ME!

Version:
$Id: StyleImpl.java 17701 2006-01-23 00:00:51Z desruisseaux $
Author:
James Macgill, CCG

Field Summary
 
Fields inherited from class org.geotools.event.AbstractGTComponent
notification
 
Constructor Summary
protected StyleImpl()
          Creates a new instance of StyleImpl
 
Method Summary
 void accept(StyleVisitor visitor)
          Used to navigate Style information during portrayal.
 void addFeatureTypeStyle(FeatureTypeStyle type)
           
 java.lang.Object clone()
          Clones the Style.
 boolean equals(java.lang.Object oth)
          Compares this Style with another.
 java.lang.String getAbstract()
          Description of this style
 FeatureTypeStyle[] getFeatureTypeStyles()
          Array of FeatureTypeStyles in portrayal order.
 java.lang.String getName()
          Style name (machine readable, don't show to users)
 java.lang.String getTitle()
           
 int hashCode()
          Overrides hashcode.
 boolean isDefault()
          Indicates that this is the default style.
 void setAbstract(java.lang.String abstractStr)
           
 void setDefault(boolean isDefault)
          Indicates that this is the default style.
 void setFeatureTypeStyles(FeatureTypeStyle[] styles)
           
 void setName(java.lang.String name)
           
 void setTitle(java.lang.String title)
           
 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

StyleImpl

protected StyleImpl()
Creates a new instance of StyleImpl

Method Detail

getAbstract

public java.lang.String getAbstract()
Description copied from interface: Style
Description of this style

Specified by:
getAbstract in interface Style

getFeatureTypeStyles

public FeatureTypeStyle[] getFeatureTypeStyles()
Description copied from interface: Style
Array of FeatureTypeStyles in portrayal order.

FeatureTypeStyle entries are rendered in order of appearance in this list.

Note: We are using a Array here to continue with Java 1.4 deployment.

Specified by:
getFeatureTypeStyles in interface Style

setFeatureTypeStyles

public void setFeatureTypeStyles(FeatureTypeStyle[] styles)
Specified by:
setFeatureTypeStyles in interface Style

addFeatureTypeStyle

public void addFeatureTypeStyle(FeatureTypeStyle type)
Specified by:
addFeatureTypeStyle in interface Style

getName

public java.lang.String getName()
Description copied from interface: Style
Style name (machine readable, don't show to users)

Specified by:
getName in interface Style

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface Style

isDefault

public boolean isDefault()
Description copied from interface: Style
Indicates that this is the default style.

Specified by:
isDefault in interface Style

setAbstract

public void setAbstract(java.lang.String abstractStr)
Specified by:
setAbstract in interface Style

setDefault

public void setDefault(boolean isDefault)
Description copied from interface: Style
Indicates that this is the default style.

Assume this is kept for GeoServer enabling a WMS to track which style is considered the default. May consider providing a clientProperties mechanism similar to Swing JComponent allowing applications to mark up the Style content for custom uses.

Specified by:
setDefault in interface Style
Parameters:
isDefault -

setName

public void setName(java.lang.String name)
Specified by:
setName in interface Style

setTitle

public void setTitle(java.lang.String title)
Specified by:
setTitle in interface Style

accept

public void accept(StyleVisitor visitor)
Description copied from interface: Style
Used to navigate Style information during portrayal.

Specified by:
accept in interface Style
Parameters:
visitor -

clone

public java.lang.Object clone()
Clones the Style. Creates deep copy clone of the style.

Specified by:
clone in interface org.opengis.util.Cloneable
Overrides:
clone in class AbstractGTComponent
Returns:
the Clone of the style.
Throws:
java.lang.RuntimeException - DOCUMENT ME!
See Also:
org.geotools.styling.Style#clone()

hashCode

public int hashCode()
Overrides hashcode.

Returns:
The hash code.

equals

public boolean equals(java.lang.Object oth)
Compares this Style with another.

Two StyleImpl are equal if they have the same properties and the same list of FeatureTypeStyles.

Parameters:
oth - The object to compare with this for equality.
Returns:
True if this and oth are equal.

toString

public java.lang.String toString()


Copyright © GeoTools. All Rights Reserved.