Class JImageFeatureLayer
java.lang.Object
org.jorigin.jfx.JImageFeatureLayer
- All Implemented Interfaces:
Named,HandleDisplay,HandleSelection
An layer that can reference
image feature that can be displayed within a JImageCanvas.- Version:
- 1.0.0
- Author:
- Julien Seinturier - IVM Technologies - http://www.seinturier.fr
-
Constructor Summary
ConstructorsConstructorDescriptionJImageFeatureLayer(String name) Create a new @link JImageFeature image feature} layer with the given name.JImageFeatureLayer(String name, Collection<JImageFeature> features, boolean selectable, boolean selected, boolean displayable, boolean displaying) Create a newimage featurelayer with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddImageFeature(JImageFeature feature) Add the givenimage featureto this layer.booleanAdd the givenlayer listenerto this layer.booleanaddImageFeatures(Collection<JImageFeature> features) Add the givenimage featuresto this layer.protected voidfireOnImageFeatureAdded(JImageFeature feature) Fire anonImageFeatureAddedcallback on all registeredlistener.protected voidfireOnImageFeatureRemoved(JImageFeature feature) Fire anonImageFeatureRemovedcallback on all registeredlistener.protected voidfireOnImageFeaturesAdded(Collection<JImageFeature> features) Fire anonImageFeaturesAddedcallback on all registeredlistener.protected voidfireOnImageFeaturesRemoved(Collection<JImageFeature> features) Fire anonImageFeaturesRemovedcallback on all registeredlistener.Get theimage featuresthat are attached to this layer.getName()booleanbooleanbooleanbooleanvoidonImageFeatureModified(JImageFeature feature) This method can be called by an attachedimage featurewhen its modified.booleanremoveImageFeature(JImageFeature feature) Remove the givenimage featurefrom this layer.booleanRemove the givenlayer listenerfrom this layer.booleanremoveImageFeatures(Collection<JImageFeature> features) Remove the givenimage featuresfrom this layer.voidsetImageFeatures(Collection<JImageFeature> features) Set theimage featuresto attach to to this layer.voidvoidsetStateDisplayable(boolean displayable) voidsetStateDisplaying(boolean displaying) voidsetStateSelectable(boolean selectable) voidsetStateSelected(boolean selected)
-
Constructor Details
-
JImageFeatureLayer
Create a new @link JImageFeature image feature} layer with the given name. By default the layer is displayable, displayed, selectable but not selected.- Parameters:
name- the name of the layer
-
JImageFeatureLayer
public JImageFeatureLayer(String name, Collection<JImageFeature> features, boolean selectable, boolean selected, boolean displayable, boolean displaying) Create a newimage featurelayer with the given parameters.- Parameters:
name- the name of the layerfeatures- the features that compose the layerselectable-trueif the layer can be selected andfalseotherwiseselected-trueif the layer is currently selected andfalseotherwisedisplayable-trueif the layer can be displayed andfalseotherwisedisplaying-trueif the layer is currently displayed andfalseotherwise
-
-
Method Details
-
isStateDisplaying
public boolean isStateDisplaying()- Specified by:
isStateDisplayingin interfaceHandleDisplay
-
setStateDisplaying
public void setStateDisplaying(boolean displaying) - Specified by:
setStateDisplayingin interfaceHandleDisplay
-
isStateDisplayable
public boolean isStateDisplayable()- Specified by:
isStateDisplayablein interfaceHandleDisplay
-
setStateDisplayable
public void setStateDisplayable(boolean displayable) - Specified by:
setStateDisplayablein interfaceHandleDisplay
-
isStateSelected
public boolean isStateSelected()- Specified by:
isStateSelectedin interfaceHandleSelection
-
setStateSelected
public void setStateSelected(boolean selected) - Specified by:
setStateSelectedin interfaceHandleSelection
-
isStateSelectable
public boolean isStateSelectable()- Specified by:
isStateSelectablein interfaceHandleSelection
-
setStateSelectable
public void setStateSelectable(boolean selectable) - Specified by:
setStateSelectablein interfaceHandleSelection
-
getName
-
setName
-
getImageFeatures
Get theimage featuresthat are attached to this layer.- Returns:
- the
image featurethat are attached to this layer - See Also:
-
setImageFeatures
Set theimage featuresto attach to to this layer.- Parameters:
features- theimage featuresto attach to to this layer- See Also:
-
addImageFeature
Add the givenimage featureto this layer.- Parameters:
feature- the feature to add- Returns:
trueif the feature is successfully added andfalseotherwise- See Also:
-
addImageFeatures
Add the givenimage featuresto this layer.- Parameters:
features- the features to add- Returns:
trueif the features are successfully added andfalseotherwise- See Also:
-
removeImageFeature
Remove the givenimage featurefrom this layer.- Parameters:
feature- the feature to remove- Returns:
trueif the feature is successfully removed andfalseotherwise- See Also:
-
removeImageFeatures
Remove the givenimage featuresfrom this layer.- Parameters:
features- the features to remove- Returns:
trueif the features are successfully removed andfalseotherwise- See Also:
-
addImageFeatureLayerListener
Add the givenlayer listenerto this layer.- Parameters:
listener- the listener to add- Returns:
trueif the listener is successfully added andfalseotherwise- See Also:
-
removeImageFeatureLayerListener
Remove the givenlayer listenerfrom this layer.- Parameters:
listener- the listener to remove- Returns:
trueif the listener is successfully removed andfalseotherwise- See Also:
-
fireOnImageFeatureAdded
Fire anonImageFeatureAddedcallback on all registeredlistener.- Parameters:
feature- the feature involved with the callback
-
fireOnImageFeatureRemoved
Fire anonImageFeatureRemovedcallback on all registeredlistener.- Parameters:
feature- the feature involved with the callback
-
fireOnImageFeaturesAdded
Fire anonImageFeaturesAddedcallback on all registeredlistener.- Parameters:
features- the features involved with the callback
-
fireOnImageFeaturesRemoved
Fire anonImageFeaturesRemovedcallback on all registeredlistener.- Parameters:
features- the features involved with the callback
-
onImageFeatureModified
This method can be called by an attachedimage featurewhen its modified.- Parameters:
feature- the modified feature (the one that call this method)
-