12 |
import com.vividsolutions.jts.geom.Envelope; |
import com.vividsolutions.jts.geom.Envelope; |
13 |
|
|
14 |
/** |
/** |
15 |
* This class is a default implementation of {@link StyledMapInterface}. |
* This class is a default implementation of {@link StyledLayerInterface}. |
16 |
* {@link StyledMapInterface#dispose()} and {@link StyledMapInterface#uncache()} |
* {@link StyledLayerInterface#dispose()} and {@link StyledLayerInterface#uncache()} |
17 |
* must be implemented by the sub class. This class only implements the "hold" |
* must be implemented by the sub class. This class only implements the "hold" |
18 |
* of an geo object of type {@code <E>}. |
* of an geo object of type {@code <E>}. |
19 |
* @author <a href="mailto:[email protected]">Martin Schmitz</a> (University of Bonn/Germany) |
* @author <a href="mailto:[email protected]">Martin Schmitz</a> (University of Bonn/Germany) |
20 |
* @version 1.0 |
* @version 1.0 |
21 |
*/ |
*/ |
22 |
public abstract class AbstractStyledMap<E> implements StyledMapInterface<E> { |
public abstract class AbstractStyledLayer<E> implements StyledLayerInterface<E> { |
23 |
/** Logger for warning- and error messages. */ |
/** Logger for warning- and error messages. */ |
24 |
protected Logger LOGGER = LangUtil.createLogger(this); |
protected Logger LOGGER = LangUtil.createLogger(this); |
25 |
|
|
56 |
* @exception IllegalArgumentException if {@code null} is given as ID or |
* @exception IllegalArgumentException if {@code null} is given as ID or |
57 |
* geo object |
* geo object |
58 |
*/ |
*/ |
59 |
public AbstractStyledMap(E geoObject, Envelope envelope, CoordinateReferenceSystem crs, String id, Translation title, Translation desc, Translation keywords, Style style, ImageIcon icon) { |
public AbstractStyledLayer(E geoObject, Envelope envelope, CoordinateReferenceSystem crs, String id, Translation title, Translation desc, Translation keywords, Style style, ImageIcon icon) { |
60 |
if ( id == null ) |
if ( id == null ) |
61 |
throw new IllegalArgumentException("ID is not allowed to be null!"); |
throw new IllegalArgumentException("ID is not allowed to be null!"); |
62 |
if ( geoObject == null ) |
if ( geoObject == null ) |
85 |
* @param icon an icon for the object |
* @param icon an icon for the object |
86 |
* @exception IllegalArgumentException if {@code null} is given as ID |
* @exception IllegalArgumentException if {@code null} is given as ID |
87 |
*/ |
*/ |
88 |
public AbstractStyledMap(E geoObject, Envelope envelope, CoordinateReferenceSystem crs, String id, String title, String desc, String keywords, Style style, ImageIcon icon ) { |
public AbstractStyledLayer(E geoObject, Envelope envelope, CoordinateReferenceSystem crs, String id, String title, String desc, String keywords, Style style, ImageIcon icon ) { |
89 |
this(geoObject, envelope, crs, id, (Translation)null, null, null, style, icon); |
this(geoObject, envelope, crs, id, (Translation)null, null, null, style, icon); |
90 |
setTitle( title ); |
setTitle( title ); |
91 |
setDesc( desc ); |
setDesc( desc ); |
94 |
|
|
95 |
/** |
/** |
96 |
* Returns a ID for the geo object. The ID should be unique in a map ob |
* Returns a ID for the geo object. The ID should be unique in a map ob |
97 |
* {@linkplain StyledMapInterface styled map objects} |
* {@linkplain StyledLayerInterface styled map objects} |
98 |
*/ |
*/ |
99 |
public String getId() { |
public String getId() { |
100 |
return id; |
return id; |