public class Layer extends AbstractLayerable implements LayerManagerProxy
When adding or removing multiple features to this Layer's FeatureCollection, prefer #addAll and #removeAll to #add and #remove -- fewer events will be fired.
| Modifier and Type | Field and Description |
|---|---|
static String |
FIRING_APPEARANCE_CHANGED_ON_ATTRIBUTE_CHANGE |
| Constructor and Description |
|---|
Layer()
Called by Java2XML
|
Layer(String name,
Color fillColor,
FeatureCollection featureCollection,
LayerManager layerManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addStyle(Style style) |
static UndoableCommand |
addUndo(String layerName,
LayerManagerProxy proxy,
UndoableCommand wrappeeCommand)
Enables a layer to be changed undoably.
|
Collection |
cloneStyles() |
static Color |
defaultLineColor(Color fillColor) |
void |
dispose()
Releases references to the data, to facilitate garbage collection.
|
BasicStyle |
getBasicStyle() |
Blackboard |
getBlackboard() |
DataSourceQuery |
getDataSourceQuery() |
String |
getDescription() |
FeatureCollectionWrapper |
getFeatureCollectionWrapper()
Returns a wrapper around the FeatureCollection which was added using
#wrapFeatureCollection.
|
LabelStyle |
getLabelStyle() |
Style |
getStyle(Class c)
Styles do not notify the Layer when their parameters change.
|
List |
getStyles() |
VertexStyle |
getVertexStyle() |
boolean |
hasReadableDataSource() |
boolean |
isDrawingLast() |
boolean |
isEditable() |
boolean |
isFeatureCollectionModified() |
boolean |
isSynchronizingLineColor() |
void |
removeStyle(Style p) |
Layer |
setDataSourceQuery(DataSourceQuery dataSourceQuery) |
void |
setDescription(String description) |
void |
setDrawingLast(boolean drawingLast)
Used for lightweight layers like the Vector layer.
|
void |
setEditable(boolean editable)
Editability is not enforced; all parties are responsible for heeding
this flag.
|
void |
setFeatureCollection(FeatureCollection featureCollection) |
Layer |
setFeatureCollectionModified(boolean featureCollectionModified) |
protected void |
setFeatureCollectionWrapper(FeatureCollectionWrapper featureCollectionWrapper) |
void |
setLayerManager(LayerManager layerManager)
Called by Java2XML
|
void |
setStyles(Collection newStyles) |
void |
setSynchronizingLineColor(boolean synchronizingLineColor) |
static void |
tryToInvalidateEnvelope(Layer layer)
Does nothing if the underlying feature collection is not a FeatureDataset.
|
fireAppearanceChanged, fireLayerChanged, getLayerManager, getName, isVisible, setName, setVisible, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLayerManagerpublic static final String FIRING_APPEARANCE_CHANGED_ON_ATTRIBUTE_CHANGE
public Layer()
public Layer(String name, Color fillColor, FeatureCollection featureCollection, LayerManager layerManager)
public static Color defaultLineColor(Color fillColor)
public void setDescription(String description)
public void setDrawingLast(boolean drawingLast)
drawingLast - true if the layer should be among those drawn lastpublic void setFeatureCollection(FeatureCollection featureCollection)
public void setEditable(boolean editable)
public boolean isEditable()
public void setSynchronizingLineColor(boolean synchronizingLineColor)
public BasicStyle getBasicStyle()
public VertexStyle getVertexStyle()
public LabelStyle getLabelStyle()
public String getDescription()
public FeatureCollectionWrapper getFeatureCollectionWrapper()
protected void setFeatureCollectionWrapper(FeatureCollectionWrapper featureCollectionWrapper)
public Style getStyle(Class c)
c - Can even be the desired Style's superclass or interfacepublic List getStyles()
public boolean hasReadableDataSource()
public boolean isDrawingLast()
public boolean isSynchronizingLineColor()
public void addStyle(Style style)
public void dispose()
public void removeStyle(Style p)
public Collection cloneStyles()
public void setStyles(Collection newStyles)
public void setLayerManager(LayerManager layerManager)
LayerablesetLayerManager in interface LayerablesetLayerManager in class AbstractLayerablepublic Blackboard getBlackboard()
getBlackboard in interface Layerablepublic static UndoableCommand addUndo(String layerName, LayerManagerProxy proxy, UndoableCommand wrappeeCommand)
public static void tryToInvalidateEnvelope(Layer layer)
public DataSourceQuery getDataSourceQuery()
public Layer setDataSourceQuery(DataSourceQuery dataSourceQuery)
public boolean isFeatureCollectionModified()
public Layer setFeatureCollectionModified(boolean featureCollectionModified)
Copyright © 2015. All rights reserved.