Class JImageFeatureLayer

java.lang.Object
org.jorigin.jfx.JImageFeatureLayer
All Implemented Interfaces:
org.jorigin.identification.Named, org.jorigin.state.HandleDisplay, org.jorigin.state.HandleSelection

public class JImageFeatureLayer extends Object implements org.jorigin.state.HandleSelection, org.jorigin.state.HandleDisplay, org.jorigin.identification.Named
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 Details

    • JImageFeatureLayer

      public JImageFeatureLayer(String name)
      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 new image feature layer with the given parameters.
      Parameters:
      name - the name of the layer
      features - the features that compose the layer
      selectable - true if the layer can be selected and false otherwise
      selected - true if the layer is currently selected and false otherwise
      displayable - true if the layer can be displayed and false otherwise
      displaying - true if the layer is currently displayed and false otherwise
  • Method Details

    • isStateDisplaying

      public boolean isStateDisplaying()
      Specified by:
      isStateDisplaying in interface org.jorigin.state.HandleDisplay
    • setStateDisplaying

      public void setStateDisplaying(boolean displaying)
      Specified by:
      setStateDisplaying in interface org.jorigin.state.HandleDisplay
    • isStateDisplayable

      public boolean isStateDisplayable()
      Specified by:
      isStateDisplayable in interface org.jorigin.state.HandleDisplay
    • setStateDisplayable

      public void setStateDisplayable(boolean displayable)
      Specified by:
      setStateDisplayable in interface org.jorigin.state.HandleDisplay
    • isStateSelected

      public boolean isStateSelected()
      Specified by:
      isStateSelected in interface org.jorigin.state.HandleSelection
    • setStateSelected

      public void setStateSelected(boolean selected)
      Specified by:
      setStateSelected in interface org.jorigin.state.HandleSelection
    • isStateSelectable

      public boolean isStateSelectable()
      Specified by:
      isStateSelectable in interface org.jorigin.state.HandleSelection
    • setStateSelectable

      public void setStateSelectable(boolean selectable)
      Specified by:
      setStateSelectable in interface org.jorigin.state.HandleSelection
    • getName

      public String getName()
      Specified by:
      getName in interface org.jorigin.identification.Named
    • setName

      public void setName(String name)
      Specified by:
      setName in interface org.jorigin.identification.Named
    • getImageFeatures

      public List<JImageFeature> getImageFeatures()
      Get the image features that are attached to this layer.
      Returns:
      the image feature that are attached to this layer
      See Also:
    • setImageFeatures

      public void setImageFeatures(Collection<JImageFeature> features)
      Set the image features to attach to to this layer.
      Parameters:
      features - the image features to attach to to this layer
      See Also:
    • addImageFeature

      public boolean addImageFeature(JImageFeature feature)
      Add the given image feature to this layer.
      Parameters:
      feature - the feature to add
      Returns:
      true if the feature is successfully added and false otherwise
      See Also:
    • addImageFeatures

      public boolean addImageFeatures(Collection<JImageFeature> features)
      Add the given image features to this layer.
      Parameters:
      features - the features to add
      Returns:
      true if the features are successfully added and false otherwise
      See Also:
    • removeImageFeature

      public boolean removeImageFeature(JImageFeature feature)
      Remove the given image feature from this layer.
      Parameters:
      feature - the feature to remove
      Returns:
      true if the feature is successfully removed and false otherwise
      See Also:
    • removeImageFeatures

      public boolean removeImageFeatures(Collection<JImageFeature> features)
      Remove the given image features from this layer.
      Parameters:
      features - the features to remove
      Returns:
      true if the features are successfully removed and false otherwise
      See Also:
    • addImageFeatureLayerListener

      public boolean addImageFeatureLayerListener(JImageFeatureLayerListener listener)
      Add the given layer listener to this layer.
      Parameters:
      listener - the listener to add
      Returns:
      true if the listener is successfully added and false otherwise
      See Also:
    • removeImageFeatureLayerListener

      public boolean removeImageFeatureLayerListener(JImageFeatureLayerListener listener)
      Remove the given layer listener from this layer.
      Parameters:
      listener - the listener to remove
      Returns:
      true if the listener is successfully removed and false otherwise
      See Also:
    • fireOnImageFeatureAdded

      protected void fireOnImageFeatureAdded(JImageFeature feature)
      Fire an onImageFeatureAdded callback on all registered listener.
      Parameters:
      feature - the feature involved with the callback
    • fireOnImageFeatureRemoved

      protected void fireOnImageFeatureRemoved(JImageFeature feature)
      Fire an onImageFeatureRemoved callback on all registered listener.
      Parameters:
      feature - the feature involved with the callback
    • fireOnImageFeaturesAdded

      protected void fireOnImageFeaturesAdded(Collection<JImageFeature> features)
      Fire an onImageFeaturesAdded callback on all registered listener.
      Parameters:
      features - the features involved with the callback
    • fireOnImageFeaturesRemoved

      protected void fireOnImageFeaturesRemoved(Collection<JImageFeature> features)
      Fire an onImageFeaturesRemoved callback on all registered listener.
      Parameters:
      features - the features involved with the callback
    • onImageFeatureModified

      public void onImageFeatureModified(JImageFeature feature)
      This method can be called by an attached image feature when its modified.
      Parameters:
      feature - the modified feature (the one that call this method)