org.geotools.styling
Class StyleImpl

Object
  extended by StyleImpl
All Implemented Interfaces:
Cloneable, Style
Direct Known Subclasses:
BasicLineStyle, BasicPolygonStyle

public class StyleImpl
extends Object
implements Style, Cloneable

Implementation of style

Author:
James Macgill, CCG
Module:

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)
           
 Object clone()
          Clones the Style.
 boolean equals(Object oth)
          Compares this Style with another.
 String getAbstract()
          Description of this style
 Description getDescription()
          Description for this style.
 FeatureTypeStyle[] getFeatureTypeStyles()
          Array of FeatureTypeStyles in portrayal order.
 String getName()
          Style name (machine readable, don't show to users)
 String getTitle()
          Style Title (human readable name for user interfaces)
 int hashCode()
          Overrides hashcode.
 boolean isDefault()
          Indicates that this is the default style.
 void setAbstract(String abstractStr)
           
 void setDefault(boolean isDefault)
          Indicates that this is the default style.
 void setFeatureTypeStyles(FeatureTypeStyle[] styles)
           
 void setName(String name)
           
 void setTitle(String title)
           
 String toString()
           
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StyleImpl

protected StyleImpl()
Creates a new instance of StyleImpl

Method Detail

getDescription

public Description getDescription()
Description copied from interface: Style
Description for this style.

Specified by:
getDescription in interface Style
Returns:
Human readable description for use in user interfaces

getAbstract

public 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 String getName()
Description copied from interface: Style
Style name (machine readable, don't show to users)

Specified by:
getName in interface Style

getTitle

public String getTitle()
Description copied from interface: Style
Style Title (human readable name for user interfaces)

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(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

setName

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

setTitle

public void setTitle(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

clone

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

Overrides:
clone in class Object
Returns:
the Clone of the style.
Throws:
RuntimeException - DOCUMENT ME!
See Also:
org.geotools.styling.Style#clone()

hashCode

public int hashCode()
Overrides hashcode.

Overrides:
hashCode in class Object
Returns:
The hash code.

equals

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

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

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1996-2009 Geotools. All Rights Reserved.