- java.lang.Object
-
- org.eclipse.gef.mvc.fx.parts.AbstractVisualPart<V>
-
- org.eclipse.gef.mvc.fx.parts.AbstractHandlePart<javafx.scene.Node>
-
- net.officefloor.gef.editor.internal.parts.AdaptedActionHandlePart<R,O,M>
-
- 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
-
-
Constructor Summary
Constructors Constructor Description AdaptedActionHandlePart()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <N extends javafx.scene.Node>
NaddNode(javafx.scene.layout.Pane parent, N node)
Add theNode
to the parentPane
returning it.javafx.scene.Node
createImageWithHover(java.lang.Class<?> resourceClass, java.lang.String imageFilePath, java.lang.String hoverImageFilePath)
Convenience method to create aNode
withImage
and hoverImage
.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.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
-
-
-
-
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 classorg.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)
-
doCreateVisual
protected javafx.scene.Node doCreateVisual()
- Specified by:
doCreateVisual
in classorg.eclipse.gef.mvc.fx.parts.AbstractVisualPart<javafx.scene.Node>
-
doRefreshVisual
public void doRefreshVisual(javafx.scene.Node visual)
- Specified by:
doRefreshVisual
in classorg.eclipse.gef.mvc.fx.parts.AbstractVisualPart<javafx.scene.Node>
-
unregister
protected void unregister(org.eclipse.gef.mvc.fx.viewer.IViewer viewer)
- Overrides:
unregister
in classorg.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 parentPane
returning it.This allows for convenient adding new
Node
instances toPane
.- Specified by:
addNode
in interfaceAdaptedActionVisualFactoryContext
- Type Parameters:
N
-Node
type.- Parameters:
parent
- ParentPane
.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 aNode
withImage
and hoverImage
. Typically this is to create button for the action.- Specified by:
createImageWithHover
in interfaceAdaptedActionVisualFactoryContext
- Parameters:
resourceClass
-Class
within the class path containing the images.imageFilePath
- Path to theImage
.hoverImageFilePath
- Path to the hoverImage
.- Returns:
Node
for theImage
with hover.- See Also:
DefaultImages
-
-