Package org.geotools.styling
Class ExternalGraphicImpl
Object
ExternalGraphicImpl
- All Implemented Interfaces:
Cloneable
,ExternalGraphic
,GraphicalSymbol
,Symbol
,Cloneable
- Author:
- Ian Turton, CCG
-
Field Summary
Fields inherited from interface ExternalGraphic
EXTERNAL_GRAPHICS_EMPTY
Fields inherited from interface GraphicalSymbol
SYMBOLS_EMPTY
Fields inherited from interface Symbol
SYMBOLS_EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionExternalGraphicImpl
(Icon icon, Collection<ColorReplacement> replaces, OnLineResource source) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(StyleVisitor visitor) accept
(TraversingStyleVisitor visitor, Object data) calls the visit method of a StyleVisitorclone()
Returns a clone of the ExternalGraphicboolean
Compares this ExternalGraphi with another.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.Custom user supplied properties available when working with an external graphic.Provides the format of the external graphic.Returns the InlineContent that comprise the image.Provides the URL for where the external graphic resource can be located.Returns a OnlineResource to a file (perhaps a local file) that contains an image.getURI()
Returns the un-parsed URI for the mark (useful if the uri is using transformations or relative locations)int
hashCode()
Generates a hashcode for the ExternalGraphicvoid
setCustomProperties
(Map<String, Object> list) Custom properties; renderer may consult these values when drawing graphic.void
Setter for property Format.void
setInlineContent
(Icon inlineContent) void
setLocation
(URL location) Setter for property location.void
setOnlineResource
(OnLineResource online) void
Converts a URI in a string to the location URL
-
Constructor Details
-
ExternalGraphicImpl
public ExternalGraphicImpl() -
ExternalGraphicImpl
-
-
Method Details
-
setURI
Description copied from interface:ExternalGraphic
Converts a URI in a string to the location URL- Specified by:
setURI
in interfaceExternalGraphic
- Parameters:
uri
- the uri of the external graphic
-
getURI
Description copied from interface:ExternalGraphic
Returns the un-parsed URI for the mark (useful if the uri is using transformations or relative locations)- Specified by:
getURI
in interfaceExternalGraphic
-
getFormat
Provides the format of the external graphic.- Specified by:
getFormat
in interfaceExternalGraphic
- Returns:
- The format of the external graphic. Reported as its MIME type in a String object.
-
getLocation
Provides the URL for where the external graphic resource can be located.- Specified by:
getLocation
in interfaceExternalGraphic
- Returns:
- The URL of the ExternalGraphic
- Throws:
MalformedURLException
- If unable to represent external graphic as a URL
-
setFormat
Setter for property Format.- Specified by:
setFormat
in interfaceExternalGraphic
- Parameters:
format
- New value of property Format.
-
setLocation
Setter for property location.- Specified by:
setLocation
in interfaceExternalGraphic
- Parameters:
location
- New value of property location.
-
accept
Description copied from interface:ExternalGraphic
calls the visit method of a StyleVisitor- Specified by:
accept
in interfaceExternalGraphic
- Parameters:
visitor
- the style visitor
-
accept
- Specified by:
accept
in interfaceGraphicalSymbol
- Specified by:
accept
in interfaceSymbol
-
clone
Returns a clone of the ExternalGraphic -
hashCode
public int hashCode()Generates a hashcode for the ExternalGraphic -
equals
Compares this ExternalGraphi with another.Two external graphics are equal if they have the same uri and format.
-
getCustomProperties
Description copied from interface:ExternalGraphic
Custom user supplied properties available when working with an external graphic.- Specified by:
getCustomProperties
in interfaceExternalGraphic
- Returns:
- properties
-
setCustomProperties
Description copied from interface:ExternalGraphic
Custom properties; renderer may consult these values when drawing graphic.- Specified by:
setCustomProperties
in interfaceExternalGraphic
-
getOnlineResource
Description copied from interface:ExternalGraphic
Returns 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 theInlineContent
property is set.- Specified by:
getOnlineResource
in interfaceExternalGraphic
- Returns:
- OnlineResource
-
setOnlineResource
-
getInlineContent
Description copied from interface:ExternalGraphic
Returns the InlineContent that comprise the image. This overrides theOnlineResource
property, if it is set.- Specified by:
getInlineContent
in interfaceExternalGraphic
-
setInlineContent
-
getColorReplacements
Description copied from interface:ExternalGraphic
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.- Specified by:
getColorReplacements
in interfaceExternalGraphic
-
colorReplacements
-