public class ExternalGraphicImpl extends Object implements ExternalGraphic, Symbol, Cloneable
EXTERNAL_GRAPHICS_EMPTY
SYMBOLS_EMPTY
Constructor and Description |
---|
ExternalGraphicImpl() |
ExternalGraphicImpl(Icon icon,
Collection<ColorReplacement> replaces,
OnLineResource source) |
Modifier and Type | Method and Description |
---|---|
void |
accept(StyleVisitor visitor) |
Object |
accept(StyleVisitor visitor,
Object data)
calls the visit method of a StyleVisitor
|
Object |
clone()
Returns a clone of the ExternalGraphic
|
Set<ColorReplacement> |
colorReplacements() |
boolean |
equals(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.
|
String |
getFormat()
Provides the format of the external graphic.
|
Icon |
getInlineContent()
Returns the InlineContent that comprise the image.
|
URL |
getLocation()
Provides the URL for where the external graphic resource can be located.
|
OnLineResource |
getOnlineResource()
Returns a OnlineResource to a file (perhaps a local file) that contains an image.
|
String |
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 ExternalGraphic
|
void |
setCustomProperties(Map<String,Object> list)
Custom properties; renderer may consult these values when drawing graphic.
|
void |
setFormat(String format)
Setter for property Format.
|
void |
setInlineContent(Icon inlineContent) |
void |
setLocation(URL location)
Setter for property location.
|
void |
setOnlineResource(OnLineResource online) |
void |
setURI(String uri)
Converts a URI in a string to the location URL
|
public ExternalGraphicImpl()
public ExternalGraphicImpl(Icon icon, Collection<ColorReplacement> replaces, OnLineResource source)
public void setURI(String uri)
ExternalGraphic
uri
- the uri of the external graphicpublic String getURI()
ExternalGraphic
public String getFormat()
getFormat
in interface ExternalGraphic
public URL getLocation() throws MalformedURLException
MalformedURLException
- If unable to represent external graphic as a URLpublic void setFormat(String format)
format
- New value of property Format.public void setLocation(URL location)
location
- New value of property location.public Object accept(StyleVisitor visitor, Object data)
ExternalGraphic
accept
in interface ExternalGraphic
visitor
- the style visitorpublic void accept(StyleVisitor visitor)
public Object clone()
public int hashCode()
public boolean equals(Object oth)
Two external graphics are equal if they have the same uri and format.
public Map<String,Object> getCustomProperties()
ExternalGraphic
public void setCustomProperties(Map<String,Object> list)
ExternalGraphic
The default GeoTools renderer uses the following:
public OnLineResource getOnlineResource()
ExternalGraphic
InlineContent
property is set.getOnlineResource
in interface ExternalGraphic
public void setOnlineResource(OnLineResource online)
public Icon getInlineContent()
ExternalGraphic
OnlineResource
property, if it is set.getInlineContent
in interface ExternalGraphic
public void setInlineContent(Icon inlineContent)
public Collection<ColorReplacement> getColorReplacements()
ExternalGraphic
Interpolate
.getColorReplacements
in interface ExternalGraphic
public Set<ColorReplacement> colorReplacements()
Copyright © 1996–2023 Geotools. All rights reserved.