Package org.geotools.styling
Class ExternalGraphicImpl
- Object
- 
- ExternalGraphicImpl
 
- 
- All Implemented Interfaces:
- Cloneable,- ExternalGraphic,- GraphicalSymbol,- Symbol,- Cloneable
 
 public class ExternalGraphicImpl extends Object implements Symbol, Cloneable, ExternalGraphic - Author:
- Ian Turton, CCG
 
- 
- 
Field Summary- 
Fields inherited from interface ExternalGraphicEXTERNAL_GRAPHICS_EMPTY
 - 
Fields inherited from interface GraphicalSymbolSYMBOLS_EMPTY
 - 
Fields inherited from interface SymbolSYMBOLS_EMPTY
 
- 
 - 
Constructor SummaryConstructors Constructor Description ExternalGraphicImpl()ExternalGraphicImpl(Icon icon, Collection<ColorReplacement> replaces, OnLineResource source)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(StyleVisitor visitor)Objectaccept(TraversingStyleVisitor visitor, Object data)calls the visit method of a StyleVisitorObjectclone()Returns a clone of the ExternalGraphicSet<ColorReplacement>colorReplacements()booleanequals(Object oth)Compares this ExternalGraphi with another.Collection<ColorReplacement>getColorReplacements()The ColorReplacement element, which may occur multiple times, allows to replace a color in the ExternalGraphic, the color specified in the OriginalColor sub-element, by another color as a result of a recode function as defined in Interpolate.Map<String,Object>getCustomProperties()Custom user supplied properties available when working with an external graphic.StringgetFormat()Provides the format of the external graphic.IcongetInlineContent()Returns the InlineContent that comprise the image.URLgetLocation()Provides the URL for where the external graphic resource can be located.OnLineResourcegetOnlineResource()Returns a OnlineResource to a file (perhaps a local file) that contains an image.StringgetURI()Returns the un-parsed URI for the mark (useful if the uri is using transformations or relative locations)inthashCode()Generates a hashcode for the ExternalGraphicvoidsetCustomProperties(Map<String,Object> list)Custom properties; renderer may consult these values when drawing graphic.voidsetFormat(String format)Setter for property Format.voidsetInlineContent(Icon inlineContent)voidsetLocation(URL location)Setter for property location.voidsetOnlineResource(OnLineResource online)voidsetURI(String uri)Converts a URI in a string to the location URL
 
- 
- 
- 
Constructor Detail- 
ExternalGraphicImplpublic ExternalGraphicImpl() 
 - 
ExternalGraphicImplpublic ExternalGraphicImpl(Icon icon, Collection<ColorReplacement> replaces, OnLineResource source) 
 
- 
 - 
Method Detail- 
setURIpublic void setURI(String uri) Description copied from interface:ExternalGraphicConverts a URI in a string to the location URL- Specified by:
- setURIin interface- ExternalGraphic
- Parameters:
- uri- the uri of the external graphic
 
 - 
getURIpublic String getURI() Description copied from interface:ExternalGraphicReturns the un-parsed URI for the mark (useful if the uri is using transformations or relative locations)- Specified by:
- getURIin interface- ExternalGraphic
 
 - 
getFormatpublic String getFormat() Provides the format of the external graphic.- Specified by:
- getFormatin interface- ExternalGraphic
- Returns:
- The format of the external graphic. Reported as its MIME type in a String object.
 
 - 
getLocationpublic URL getLocation() throws MalformedURLException Provides the URL for where the external graphic resource can be located.- Specified by:
- getLocationin interface- ExternalGraphic
- Returns:
- The URL of the ExternalGraphic
- Throws:
- MalformedURLException- If unable to represent external graphic as a URL
 
 - 
setFormatpublic void setFormat(String format) Setter for property Format.- Specified by:
- setFormatin interface- ExternalGraphic
- Parameters:
- format- New value of property Format.
 
 - 
setLocationpublic void setLocation(URL location) Setter for property location.- Specified by:
- setLocationin interface- ExternalGraphic
- Parameters:
- location- New value of property location.
 
 - 
acceptpublic Object accept(TraversingStyleVisitor visitor, Object data) Description copied from interface:ExternalGraphiccalls the visit method of a StyleVisitor- Specified by:
- acceptin interface- ExternalGraphic
- Parameters:
- visitor- the style visitor
 
 - 
acceptpublic void accept(StyleVisitor visitor) - Specified by:
- acceptin interface- GraphicalSymbol
- Specified by:
- acceptin interface- Symbol
 
 - 
clonepublic Object clone() Returns a clone of the ExternalGraphic
 - 
hashCodepublic int hashCode() Generates a hashcode for the ExternalGraphic
 - 
equalspublic boolean equals(Object oth) Compares this ExternalGraphi with another.Two external graphics are equal if they have the same uri and format. 
 - 
getCustomPropertiespublic Map<String,Object> getCustomProperties() Description copied from interface:ExternalGraphicCustom user supplied properties available when working with an external graphic.- Specified by:
- getCustomPropertiesin interface- ExternalGraphic
- Returns:
- properties
 
 - 
setCustomPropertiespublic void setCustomProperties(Map<String,Object> list) Description copied from interface:ExternalGraphicCustom properties; renderer may consult these values when drawing graphic.- Specified by:
- setCustomPropertiesin interface- ExternalGraphic
 
 - 
getOnlineResourcepublic OnLineResource getOnlineResource() Description copied from interface:ExternalGraphicReturns a OnlineResource to a file (perhaps a local file) that contains an image. This can be null if the image is already loaded locally and theInlineContentproperty is set.- Specified by:
- getOnlineResourcein interface- ExternalGraphic
- Returns:
- OnlineResource
 
 - 
setOnlineResourcepublic void setOnlineResource(OnLineResource online) 
 - 
getInlineContentpublic Icon getInlineContent() Description copied from interface:ExternalGraphicReturns the InlineContent that comprise the image. This overrides theOnlineResourceproperty, if it is set.- Specified by:
- getInlineContentin interface- ExternalGraphic
 
 - 
setInlineContentpublic void setInlineContent(Icon inlineContent) 
 - 
getColorReplacementspublic Collection<ColorReplacement> getColorReplacements() Description copied from interface:ExternalGraphicThe ColorReplacement element, which may occur multiple times, allows to replace a color in the ExternalGraphic, the color specified in the OriginalColor sub-element, by another color as a result of a recode function as defined in Interpolate.- Specified by:
- getColorReplacementsin interface- ExternalGraphic
 
 - 
colorReplacementspublic Set<ColorReplacement> colorReplacements() 
 
- 
 
-