Class ContentBehavior

java.lang.Object
org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior
com.amalgamasimulation.graphicaleditor.behaviors.ContentBehavior
All Implemented Interfaces:
org.eclipse.gef.common.activate.IActivatable, org.eclipse.gef.common.adapt.IAdaptable.Bound<org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node>>, org.eclipse.gef.common.dispose.IDisposable, org.eclipse.gef.mvc.fx.behaviors.IBehavior

public class ContentBehavior extends org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior implements org.eclipse.gef.common.dispose.IDisposable
  • Property Summary

    Properties inherited from class org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior

    active, adaptable
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound

    org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl<T extends org.eclipse.gef.common.adapt.IAdaptable>
  • Field Summary

    Fields inherited from interface org.eclipse.gef.common.activate.IActivatable

    ACTIVE_PROPERTY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected void
    disposeIfObsolete(org.eclipse.gef.mvc.fx.parts.IContentPart<? extends javafx.scene.Node> contentPart)
    If the given IContentPart does neither have a parent nor any anchoreds, then it's content is set to null and the part is added to the ContentPartPool.
    protected void
     
    protected void
     
    protected org.eclipse.gef.mvc.fx.parts.IContentPart<? extends javafx.scene.Node>
    Finds/Revives/Creates an IContentPart for the given content Object.
    protected org.eclipse.gef.mvc.fx.parts.IContentPartFactory
    Returns the IContentPartFactory of the current viewer.
    protected org.eclipse.gef.mvc.fx.behaviors.ContentPartPool
    Returns the ContentPartPool that is used to recycle content parts in the context of an IViewer.
    void
    synchronizeContentPartAnchorages(org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node> anchored, com.google.common.collect.SetMultimap<? extends Object,? extends String> contentAnchorages)
    Updates the host IVisualPart's IContentPart anchorages (see IVisualPart.getAnchoragesUnmodifiable()) so that it is in sync with the set of content anchorages that is passed in.
    void
    synchronizeContentPartChildren(org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node> parent, List<? extends Object> contentChildren)
    Updates the host IVisualPart's IContentPart children (see IVisualPart.getChildrenUnmodifiable()) so that it is in sync with the set of content children that is passed in.

    Methods inherited from class org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior

    activate, activeProperty, adaptableProperty, addAnchoreds, addAnchoreds, addFeedback, addFeedback, addHandles, addHandles, clearFeedback, clearHandles, deactivate, getAdaptable, getFeedback, getFeedback, getFeedbackPartFactory, getFeedbackPartFactory, getFeedbackPerTargetSet, getHandlePartFactory, getHandlePartFactory, getHandles, getHandles, getHandlesPerTargetSet, getHost, hasFeedback, hasFeedback, hasHandles, hasHandles, isActive, removeAnchoreds, removeFeedback, removeFeedback, removeFeedback, removeHandles, removeHandles, removeHandles, setAdaptable, updateHandles, updateHandles

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ContentBehavior

      public ContentBehavior()
  • Method Details

    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.eclipse.gef.common.dispose.IDisposable
    • disposeIfObsolete

      protected void disposeIfObsolete(org.eclipse.gef.mvc.fx.parts.IContentPart<? extends javafx.scene.Node> contentPart)
      If the given IContentPart does neither have a parent nor any anchoreds, then it's content is set to null and the part is added to the ContentPartPool.
      Parameters:
      contentPart - The IContentPart that is eventually disposed.
    • doActivate

      protected void doActivate()
      Overrides:
      doActivate in class org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior
    • doDeactivate

      protected void doDeactivate()
      Overrides:
      doDeactivate in class org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior
    • findOrCreatePartFor

      protected org.eclipse.gef.mvc.fx.parts.IContentPart<? extends javafx.scene.Node> findOrCreatePartFor(Object content)
      Finds/Revives/Creates an IContentPart for the given content Object. If an IContentPart for the given content Object can be found in the viewer's content-part-map, then this part is returned. If an IContentPart for the given content Object is stored in the ContentPartPool, then this part is returned. Otherwise, the injected IContentPartFactory is used to create a new IContentPart for the given content Object.
      Parameters:
      content - The content Object for which the corresponding IContentPart is to be returned.
      Returns:
      The IContentPart corresponding to the given content Object.
    • getContentPartFactory

      protected org.eclipse.gef.mvc.fx.parts.IContentPartFactory getContentPartFactory()
      Returns the IContentPartFactory of the current viewer.
      Returns:
      the IContentPartFactory of the current viewer.
    • getContentPartPool

      protected org.eclipse.gef.mvc.fx.behaviors.ContentPartPool getContentPartPool()
      Returns the ContentPartPool that is used to recycle content parts in the context of an IViewer.
      Returns:
      The ContentPartPool of the IViewer.
    • synchronizeContentPartAnchorages

      public void synchronizeContentPartAnchorages(org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node> anchored, com.google.common.collect.SetMultimap<? extends Object,? extends String> contentAnchorages)
      Updates the host IVisualPart's IContentPart anchorages (see IVisualPart.getAnchoragesUnmodifiable()) so that it is in sync with the set of content anchorages that is passed in.
      Parameters:
      anchored - The anchored IVisualPart whose content part anchorages to synchronize with the given content anchorages.
      contentAnchorages - * The map of content anchorages with roles to be synchronized with the list of IContentPart anchorages ( IVisualPart.getAnchoragesUnmodifiable()).
      See Also:
      • IContentPart.getContentAnchoragesUnmodifiable()
      • IVisualPart.getAnchoragesUnmodifiable()
    • synchronizeContentPartChildren

      public void synchronizeContentPartChildren(org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node> parent, List<? extends Object> contentChildren)
      Updates the host IVisualPart's IContentPart children (see IVisualPart.getChildrenUnmodifiable()) so that it is in sync with the set of content children that is passed in.
      Parameters:
      parent - The parent IVisualPart whose content part children to synchronize against the given content children.
      contentChildren - The list of content part children to be synchronized with the list of IContentPart children ( IVisualPart.getChildrenUnmodifiable()).
      See Also:
      • IContentPart.getContentChildrenUnmodifiable()
      • IVisualPart.getChildrenUnmodifiable()