org.geotools.styling
Class ExternalGraphicImpl

java.lang.Object
  extended by org.geotools.styling.ExternalGraphicImpl
All Implemented Interfaces:
java.lang.Cloneable, Symbol, org.opengis.style.ExternalGraphic, org.opengis.style.GraphicalSymbol

public class ExternalGraphicImpl
extends java.lang.Object
implements ExternalGraphic, Symbol, org.opengis.util.Cloneable

DOCUMENT ME!

Version:
$Id: ExternalGraphicImpl.java 33813 2009-08-28 14:45:11Z jive $
Author:
Ian Turton, CCG

Field Summary
 
Fields inherited from interface org.geotools.styling.ExternalGraphic
EXTERNAL_GRAPHICS_EMPTY
 
Fields inherited from interface org.geotools.styling.Symbol
SYMBOLS_EMPTY
 
Constructor Summary
ExternalGraphicImpl()
           
ExternalGraphicImpl(javax.swing.Icon icon, java.util.Collection<org.opengis.style.ColorReplacement> replaces, org.opengis.metadata.citation.OnLineResource source)
           
 
Method Summary
 void accept(StyleVisitor visitor)
           
 java.lang.Object accept(org.opengis.style.StyleVisitor visitor, java.lang.Object data)
           
 java.lang.Object clone()
          Returns a clone of the ExternalGraphic
 java.util.Set<org.opengis.style.ColorReplacement> colorReplacements()
           
 boolean equals(java.lang.Object oth)
          Compares this ExternalGraphi with another.
 java.util.Collection<org.opengis.style.ColorReplacement> getColorReplacements()
           
 java.util.Map<java.lang.String,java.lang.Object> getCustomProperties()
          Custom user supplied properties available when working with an external graphic.
 java.lang.String getFormat()
          Provides the format of the external graphic.
 javax.swing.Icon getInlineContent()
           
 java.net.URL getLocation()
          Provides the URL for where the external graphic resource can be located.
 org.opengis.metadata.citation.OnLineResource getOnlineResource()
           
 int hashCode()
          Generates a hashcode for the ExternalGraphic
 void setCustomProperties(java.util.Map<java.lang.String,java.lang.Object> list)
          Custom properties; renderer may consult these values when drawing graphic.
 void setFormat(java.lang.String format)
          Setter for property Format.
 void setInlineContent(javax.swing.Icon inlineContent)
           
 void setLocation(java.net.URL location)
          Setter for property location.
 void setOnlineResource(org.opengis.metadata.citation.OnLineResource online)
           
 void setURI(java.lang.String uri)
          Deprecated. 
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalGraphicImpl

public ExternalGraphicImpl()

ExternalGraphicImpl

public ExternalGraphicImpl(javax.swing.Icon icon,
                           java.util.Collection<org.opengis.style.ColorReplacement> replaces,
                           org.opengis.metadata.citation.OnLineResource source)
Method Detail

setURI

@Deprecated
public void setURI(java.lang.String uri)
Deprecated. 

Description copied from interface: ExternalGraphic
Converts a URI in a string to the location URL

Parameters:
uri - the uri of the external graphic

getFormat

public java.lang.String getFormat()
Provides the format of the external graphic.

Specified by:
getFormat in interface org.opengis.style.ExternalGraphic
Returns:
The format of the external graphic. Reported as its MIME type in a String object.

getLocation

public java.net.URL getLocation()
                         throws java.net.MalformedURLException
Provides the URL for where the external graphic resource can be located.

Returns:
The URL of the ExternalGraphic
Throws:
java.net.MalformedURLException - If unable to represent external graphic as a URL

setFormat

public void setFormat(java.lang.String format)
Setter for property Format.

Parameters:
format - New value of property Format.

setLocation

public void setLocation(java.net.URL location)
Setter for property location.

Parameters:
location - New value of property location.

accept

public java.lang.Object accept(org.opengis.style.StyleVisitor visitor,
                               java.lang.Object data)
Specified by:
accept in interface org.opengis.style.ExternalGraphic

accept

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

clone

public java.lang.Object clone()
Returns a clone of the ExternalGraphic

Overrides:
clone in class java.lang.Object
See Also:
org.geotools.styling.ExternalGraphic#clone()

hashCode

public int hashCode()
Generates a hashcode for the ExternalGraphic

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

equals

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

Two external graphics are equal if they have the same uri and format.

Overrides:
equals in class java.lang.Object
Parameters:
oth - The other External graphic.
Returns:
True if this and the other external graphic are equal.

getCustomProperties

public java.util.Map<java.lang.String,java.lang.Object> getCustomProperties()
Description copied from interface: ExternalGraphic
Custom user supplied properties available when working with an external graphic.

Returns:
properties

setCustomProperties

public void setCustomProperties(java.util.Map<java.lang.String,java.lang.Object> list)
Description copied from interface: ExternalGraphic
Custom properties; renderer may consult these values when drawing graphic.

The default GeoTools renderer uses the following:


getOnlineResource

public org.opengis.metadata.citation.OnLineResource getOnlineResource()
Specified by:
getOnlineResource in interface org.opengis.style.ExternalGraphic

setOnlineResource

public void setOnlineResource(org.opengis.metadata.citation.OnLineResource online)

getInlineContent

public javax.swing.Icon getInlineContent()
Specified by:
getInlineContent in interface org.opengis.style.ExternalGraphic

setInlineContent

public void setInlineContent(javax.swing.Icon inlineContent)

getColorReplacements

public java.util.Collection<org.opengis.style.ColorReplacement> getColorReplacements()
Specified by:
getColorReplacements in interface org.opengis.style.ExternalGraphic

colorReplacements

public java.util.Set<org.opengis.style.ColorReplacement> colorReplacements()


Copyright © 1996-2010 Geotools. All Rights Reserved.