|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectskrueger.geotools.AbstractStyledLayer<E>
public abstract class AbstractStyledLayer<E>
This class is a default implementation of StyledLayerInterface
.
StyledLayerInterface.dispose()
and StyledLayerInterface.uncache()
must be implemented by the sub class. This class only implements the "hold"
of an geo object of type <E>
.
Field Summary | |
---|---|
protected CoordinateReferenceSystem |
crs
Holds the CRS of the geo object |
protected Translation |
desc
Holds a long (language-specific) description of the geo object. |
protected Envelope |
envelope
Holds the bounds of the geo object |
protected E |
geoObject
Holds the geo object represeneted by the map |
protected ImageIcon |
icon
Holds an icon to represent the geo object |
protected String |
id
Holds the unique ID of the geo object. |
protected Translation |
keywords
Holds the (language-specific) keywords to describe the geo object. |
protected Logger |
LOGGER
Logger for warning- and error messages. |
protected Style |
style
Holds the display style for the geo object |
protected Translation |
title
Holds a short (language-specific) description of the geo object. |
Constructor Summary | |
---|---|
AbstractStyledLayer(E geoObject,
Envelope envelope,
CoordinateReferenceSystem crs,
String id,
String title,
String desc,
String keywords,
Style style,
ImageIcon icon)
Creates a non-translated styled layer. |
|
AbstractStyledLayer(E geoObject,
Envelope envelope,
CoordinateReferenceSystem crs,
String id,
Translation title,
Translation desc,
Translation keywords,
Style style,
ImageIcon icon)
Creates a language specific styled layer. |
Method Summary | |
---|---|
protected abstract Style |
createDefaultStyle()
Creates a default style for the geo object. |
CoordinateReferenceSystem |
getCrs()
Returns the CoordinateReferenceSystem of the geo object. |
String |
getCRSString()
Returns CoordinateReferenceSystem.toString() . |
Translation |
getDesc()
Returns a long (language-specific) description of the object. |
Envelope |
getEnvelope()
Returns the bounds of the geo object. |
E |
getGeoObject()
Returns the geo object representet in the map. |
String |
getId()
Returns a ID for the geo object. |
ImageIcon |
getImageIcon()
Returns an icon, which represents the geo object. |
Translation |
getKeywords()
Returns a (language-specific) key word sequence for the geo object. |
Style |
getStyle()
Returns the display style for the geo object. |
Translation |
getTitle()
Returns a short (language-specific) description of the geo object. |
void |
setDesc(String desc)
Sets a long (non-translated) description of the object. |
void |
setDesc(Translation desc)
Sets a long (language-specific) description of the object. |
void |
setImageIcon(ImageIcon icon)
Sets an icon, which represents the geo object. |
void |
setKeywords(String keywords)
Sets a (non-translated) key word sequence for the geo object. |
void |
setKeywords(Translation keywords)
Sets a (language-specific) key word sequence for the geo object. |
void |
setStyle(Style style)
Sets the display style for the geo object. |
void |
setTitle(String title)
Sets a short (non-translated) description of the geo object. |
void |
setTitle(Translation title)
Sets a short (language-specific) description of the geo object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface skrueger.geotools.StyledLayerInterface |
---|
dispose, getInfoURL, isDisposed, uncache |
Field Detail |
---|
protected Logger LOGGER
protected String id
protected Translation title
protected Translation desc
protected Translation keywords
protected ImageIcon icon
protected E geoObject
protected CoordinateReferenceSystem crs
protected Envelope envelope
protected Style style
Constructor Detail |
---|
public AbstractStyledLayer(E geoObject, Envelope envelope, CoordinateReferenceSystem crs, String id, Translation title, Translation desc, Translation keywords, Style style, ImageIcon icon)
geoObject
- the geo objectenvelope
- the bounds of the geo objectcrs
- the CRS of the geo objectid
- a unique ID for the geo objecttitle
- a (language-specific) short descriptiondesc
- a (language-specific) long descriptionkeywords
- (language-specific) keywords for the geo objectsstyle
- a display styleicon
- an icon for the object
IllegalArgumentException
- if null
is given as ID or
geo objectpublic AbstractStyledLayer(E geoObject, Envelope envelope, CoordinateReferenceSystem crs, String id, String title, String desc, String keywords, Style style, ImageIcon icon)
geoObject
- the geo objectenvelope
- the bounds of the geo objectcrs
- the CRS of the geo objectid
- a unique ID for the geo objecttitle
- a short descriptiondesc
- a long descriptionkeywords
- keywords for the geo objectsstyle
- a display styleicon
- an icon for the object
IllegalArgumentException
- if null
is given as IDMethod Detail |
---|
public String getId()
getId
in interface StyledLayerInterface<E>
public Translation getTitle()
getTitle
in interface StyledLayerInterface<E>
public void setTitle(Translation title)
title
is null
an untranslated default title is set, so
getTitle()
never returns null
.
setTitle
in interface StyledLayerInterface<E>
title
- new description for the geo objectpublic void setTitle(String title)
title
is null
an untranslated default title is set, so
getTitle()
never returns null
.
title
- new description for the geo objectpublic Translation getDesc()
getDesc
in interface StyledLayerInterface<E>
public void setDesc(Translation desc)
desc
is null
an (untranslated) empty description is set, so
getDesc()
never returns null
.
setDesc
in interface StyledLayerInterface<E>
desc
- new description for the geo objectpublic void setDesc(String desc)
desc
is null
an (untranslated) empty description is set, so
getDesc()
never returns null
.
desc
- new description for the geo objectpublic Translation getKeywords()
getKeywords
in interface StyledLayerInterface<E>
public void setKeywords(Translation keywords)
keywords
is null
an (untranslated) empty string is set, so
getKeywords()
never returns null
.
setKeywords
in interface StyledLayerInterface<E>
keywords
- Keywordspublic void setKeywords(String keywords)
keywords
is null
an (untranslated) empty string is set, so
getKeywords()
never returns null
.
keywords
- Keywordspublic E getGeoObject()
getGeoObject
in interface StyledLayerInterface<E>
geoObject
public Envelope getEnvelope()
getEnvelope
in interface StyledLayerInterface<E>
public CoordinateReferenceSystem getCrs()
CoordinateReferenceSystem
of the geo object.
getCrs
in interface StyledLayerInterface<E>
public String getCRSString()
CoordinateReferenceSystem.toString()
. This method
can be overriden to create a "nicer" description.
getCRSString
in interface StyledLayerInterface<E>
public ImageIcon getImageIcon()
getImageIcon
in interface StyledLayerInterface<E>
null
is valid and no icon or a
default icon will then be shownpublic void setImageIcon(ImageIcon icon)
setImageIcon
in interface StyledLayerInterface<E>
icon
- an iconpublic Style getStyle()
getStyle
in interface StyledLayerInterface<E>
public void setStyle(Style style)
style
is null
an default style is set, so
getStyle()
never returns null
.
setStyle
in interface StyledLayerInterface<E>
createDefaultStyle()
protected abstract Style createDefaultStyle()
null
.
setStyle(Style)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |