public class NFEFeatureLayerRenderer extends NFERenderer<NFEFeatureElementGeoObject> implements NFEModelListener, FeatureSelectableLayer, SelectionEditableLayer
METHOD_MODEL_OBJECT_ADDED, METHOD_MODEL_OBJECT_REMOVED, METHOD_MODEL_OBJECTS_ADDED, METHOD_MODEL_OBJECTS_REMOVED, METHOD_PROPERTY_CHANGEDPROPERTY_NAME, PROPERTY_PROVIDERID, PROPERTY_SRID, PROPERTY_VISIBLE| Constructor and Description |
|---|
NFEFeatureLayerRenderer(MapCanvas canvas, NFEModel model, long featLayerId)
Allocates a new feature layer renderer
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
clearSelection()
Clears all selected objects
|
ManipulationPreview |
createPreview(java.util.Collection<Manipulation<NFENetworkElement>> manipulations)
Creates a preview for the given manipulations to network elements
|
void |
deleteSelection()
Deletes the elements currently selected
|
NFEFeatureLayer |
getFeatureLayer()
Gets the rendered feature layer
|
NFEModel |
getModel()
Gets the NFE model
|
java.util.Collection<NFEFeature> |
getSelectedFeatures()
Gets the currently selected features
|
boolean |
isShowFlow()
Tells whether the line features flow is shown
|
void |
modelObjectAdded(NFEModelObjectEvent event)
Invoked when a model object has been added
|
void |
modelObjectPropertyChanged(NFEModelObjectPropertyChangedEvent event)
Invoked when a model object's property has been changed
|
void |
modelObjectRemoved(NFEModelObjectEvent event)
Invoked when a model object has been removed
|
void |
modelObjectsAdded(NFEModelObjectsEvent event)
Invoked when one or more model objects have been added
|
void |
modelObjectsRemoved(NFEModelObjectsEvent event)
Invoked when one or more model objects have been removed
|
boolean |
select(java.util.List<GeoObject> objs)
Adds the provided objects to the selection list
|
void |
selectFeatures(java.util.Collection<java.lang.Long> featureIds)
Selects a group of features.
|
void |
setFeatureSelection(java.util.Collection<java.lang.Long> featureIds)
Sets the given features as selected.
|
boolean |
setSelection(java.util.List<GeoObject> selectedGeoObjects)
Clears selection before setting the provided objects as selected
|
void |
setShowFlow(boolean showFlow)
Sets whether the line features flow should be shown
|
void |
synchronizeWithModel()
Updates the state to reflect the feature layer's state and refreshes the view
|
addContextualMenuHandler, addSelectionListener, clear, clearHover, getDataMBR, getFullExtent, getGeoObject, getHover, getImageOpacityAlpha, getObject, getObjects, getSelection, getSelection, getSnapPoint, getTolerance, handleEvent, hitTest, hitTest, isHover, isSelected, mapRegionChanged, numHovered, numSelected, refresh, refresh, removeContextualMenuHandler, removeSelectionListener, render, setHover, setImageOpacityAlpha, stateChanged, unselect, updateadded, addPropertyChangeListener, addPropertyChangeListener, fromXMLElement, getCanvas, getIcon, getName, getProperties, getProperty, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getProviderID, getSRID, isVisible, removed, removePropertyChangeListener, removePropertyChangeListener, repaint, setCanvas, setName, setProperty, setProviderID, setSRID, setVisible, toXMLElementequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrefreshadded, fromXMLElement, getCanvas, getIcon, getName, getProviderID, getSRID, isVisible, removed, repaint, setCanvas, setName, setProviderID, setSRID, setVisible, toXMLElementpublic NFEFeatureLayer getFeatureLayer()
public NFEModel getModel()
public boolean isShowFlow()
public void setShowFlow(boolean showFlow)
showFlow - true if the flow is shownpublic void synchronizeWithModel()
public void modelObjectAdded(NFEModelObjectEvent event)
NFEModelListenermodelObjectAdded in interface NFEModelListenerevent - contains a reference to the model object that has been addedpublic void modelObjectsAdded(NFEModelObjectsEvent event)
NFEModelListenermodelObjectsAdded in interface NFEModelListenerevent - contains a collection of references to the model objects that have been addedpublic void modelObjectRemoved(NFEModelObjectEvent event)
NFEModelListenermodelObjectRemoved in interface NFEModelListenerevent - contains a reference to the model object that has been removedpublic void modelObjectsRemoved(NFEModelObjectsEvent event)
NFEModelListenermodelObjectsRemoved in interface NFEModelListenerevent - contains a collection of references to the model objects that have been removedpublic void modelObjectPropertyChanged(NFEModelObjectPropertyChangedEvent event)
NFEModelListenermodelObjectPropertyChanged in interface NFEModelListenerevent - contains a reference to the model objects which property has been changed and the name and previous value of the changed propertypublic void selectFeatures(java.util.Collection<java.lang.Long> featureIds)
FeatureSelectableLayerselectFeatures in interface FeatureSelectableLayerfeatureIds - a collection containing the IDs of the features to be selectedpublic void setFeatureSelection(java.util.Collection<java.lang.Long> featureIds)
FeatureSelectableLayersetFeatureSelection in interface FeatureSelectableLayerfeatureIds - a collection of feature IDs to be selectedpublic java.util.Collection<NFEFeature> getSelectedFeatures()
FeatureSelectableLayergetSelectedFeatures in interface FeatureSelectableLayerpublic boolean setSelection(java.util.List<GeoObject> selectedGeoObjects)
SelectableLayersetSelection in interface SelectableLayersetSelection in class NFERenderer<NFEFeatureElementGeoObject>public boolean select(java.util.List<GeoObject> objs)
SelectableLayerselect in interface SelectableLayerselect in class NFERenderer<NFEFeatureElementGeoObject>public boolean clearSelection()
SelectableLayerclearSelection in interface SelectableLayerclearSelection in class NFERenderer<NFEFeatureElementGeoObject>public ManipulationPreview createPreview(java.util.Collection<Manipulation<NFENetworkElement>> manipulations)
manipulations - a collection of network element manipulationspublic void deleteSelection()
SelectionEditableLayerdeleteSelection in interface SelectionEditableLayer