Class AdaptedActionHandlePart<R extends Model,​O,​M extends Model>

  • All Implemented Interfaces:
    AdaptedActionVisualFactoryContext, org.eclipse.gef.common.activate.IActivatable, org.eclipse.gef.common.adapt.IAdaptable, org.eclipse.gef.common.adapt.IAdaptable.Bound<org.eclipse.gef.mvc.fx.viewer.IViewer>, org.eclipse.gef.common.dispose.IDisposable, org.eclipse.gef.mvc.fx.parts.IHandlePart<javafx.scene.Node>, org.eclipse.gef.mvc.fx.parts.IVisualPart<javafx.scene.Node>

    public class AdaptedActionHandlePart<R extends Model,​O,​M extends Model>
    extends org.eclipse.gef.mvc.fx.parts.AbstractHandlePart<javafx.scene.Node>
    implements AdaptedActionVisualFactoryContext
    • Nested Class Summary

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

        org.eclipse.gef.common.adapt.IAdaptable.Bound<A extends org.eclipse.gef.common.adapt.IAdaptable>
      • 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
      • Fields inherited from interface org.eclipse.gef.common.adapt.IAdaptable

        ADAPTERS_PROPERTY
      • Fields inherited from interface org.eclipse.gef.mvc.fx.parts.IVisualPart

        ANCHORAGES_PROPERTY, ANCHOREDS_PROPERTY, CHILDREN_PROPERTY, PARENT_PROPERTY, REFRESH_VISUAL_PROPERTY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <N extends javafx.scene.Node>
      N
      addNode​(javafx.scene.layout.Pane parent, N node)
      Add the Node to the parent Pane returning it.
      javafx.scene.Node createImageWithHover​(java.lang.Class<?> resourceClass, java.lang.String imageFilePath, java.lang.String hoverImageFilePath)
      Convenience method to create a Node with Image and hover Image.
      protected javafx.scene.Node doCreateVisual()  
      void doRefreshVisual​(javafx.scene.Node visual)  
      protected void register​(org.eclipse.gef.mvc.fx.viewer.IViewer viewer)  
      void setAdaptedAction​(AdaptedAction<R,​O,​M> adaptedAction)
      Instantiate.
      void setParent​(org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node> newParent)  
      protected void unregister​(org.eclipse.gef.mvc.fx.viewer.IViewer viewer)  
      • Methods inherited from class org.eclipse.gef.mvc.fx.parts.AbstractHandlePart

        doAddChildVisual, doAttachToAnchorageVisual, doDetachFromAnchorageVisual, doRemoveChildVisual
      • Methods inherited from class org.eclipse.gef.mvc.fx.parts.AbstractVisualPart

        activate, activateAdapters, activateChildren, activeProperty, adaptableProperty, adaptersProperty, addChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenUnmodifiableProperty, deactivate, deactivateAdapters, deactivateChildren, detachAnchored, detachFromAnchorage, detachFromAnchorage, determineViewer, dispose, doActivate, doDeactivate, getAdaptable, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getHandlers, getParent, getPolicies, getRoot, getVisual, isActive, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, registerAtVisualPartMap, removeChild, removeChildren, reorderChild, setAdaptable, setAdapter, setAdapter, setAdapter, setAdapter, setRefreshVisual, unregisterFromVisualPartMap, unsetAdapter
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.eclipse.gef.common.activate.IActivatable

        activate, activeProperty, deactivate, isActive
      • Methods inherited from interface org.eclipse.gef.common.adapt.IAdaptable

        adaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapter
      • Methods inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound

        adaptableProperty, getAdaptable, setAdaptable
      • Methods inherited from interface org.eclipse.gef.common.dispose.IDisposable

        dispose
      • Methods inherited from interface org.eclipse.gef.mvc.fx.parts.IVisualPart

        addChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenUnmodifiableProperty, detachAnchored, detachFromAnchorage, detachFromAnchorage, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getHandlers, getParent, getPolicies, getRoot, getViewer, getVisual, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, removeChild, removeChildren, reorderChild, setRefreshVisual
    • Constructor Detail

      • AdaptedActionHandlePart

        public AdaptedActionHandlePart()
    • Method Detail

      • setAdaptedAction

        public void setAdaptedAction​(AdaptedAction<R,​O,​M> adaptedAction)
        Instantiate.
        Parameters:
        adaptedAction - AdaptedAction.
      • register

        protected void register​(org.eclipse.gef.mvc.fx.viewer.IViewer viewer)
        Overrides:
        register in class org.eclipse.gef.mvc.fx.parts.AbstractVisualPart<javafx.scene.Node>
      • setParent

        public void setParent​(org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node> newParent)
        Specified by:
        setParent in interface org.eclipse.gef.mvc.fx.parts.IVisualPart<R extends Model>
        Overrides:
        setParent in class org.eclipse.gef.mvc.fx.parts.AbstractVisualPart<javafx.scene.Node>
      • doCreateVisual

        protected javafx.scene.Node doCreateVisual()
        Specified by:
        doCreateVisual in class org.eclipse.gef.mvc.fx.parts.AbstractVisualPart<javafx.scene.Node>
      • doRefreshVisual

        public void doRefreshVisual​(javafx.scene.Node visual)
        Specified by:
        doRefreshVisual in class org.eclipse.gef.mvc.fx.parts.AbstractVisualPart<javafx.scene.Node>
      • unregister

        protected void unregister​(org.eclipse.gef.mvc.fx.viewer.IViewer viewer)
        Overrides:
        unregister in class org.eclipse.gef.mvc.fx.parts.AbstractVisualPart<javafx.scene.Node>
      • addNode

        public <N extends javafx.scene.Node> N addNode​(javafx.scene.layout.Pane parent,
                                                       N node)
        Description copied from interface: AdaptedActionVisualFactoryContext

        Add the Node to the parent Pane returning it.

        This allows for convenient adding new Node instances to Pane.

        Specified by:
        addNode in interface AdaptedActionVisualFactoryContext
        Type Parameters:
        N - Node type.
        Parameters:
        parent - Parent Pane.
        node - Node.
        Returns:
        Input Node
      • createImageWithHover

        public javafx.scene.Node createImageWithHover​(java.lang.Class<?> resourceClass,
                                                      java.lang.String imageFilePath,
                                                      java.lang.String hoverImageFilePath)
        Description copied from interface: AdaptedActionVisualFactoryContext
        Convenience method to create a Node with Image and hover Image. Typically this is to create button for the action.
        Specified by:
        createImageWithHover in interface AdaptedActionVisualFactoryContext
        Parameters:
        resourceClass - Class within the class path containing the images.
        imageFilePath - Path to the Image.
        hoverImageFilePath - Path to the hover Image.
        Returns:
        Node for the Image with hover.
        See Also:
        DefaultImages