Class ActionsToolbox<V extends ActionsToolboxView<?>>
- java.lang.Object
-
- org.kie.workbench.common.stunner.core.client.components.toolbox.actions.ActionsToolbox<V>
-
- Type Parameters:
V- The actions toolbox' view type.
- All Implemented Interfaces:
Iterable<ToolboxAction>,org.kie.workbench.common.stunner.core.client.components.toolbox.Toolbox<ActionsToolbox>
public class ActionsToolbox<V extends ActionsToolboxView<?>> extends Object implements org.kie.workbench.common.stunner.core.client.components.toolbox.Toolbox<ActionsToolbox>, Iterable<ToolboxAction>
A default toolbox implementation that decouples the actions/operations to perform for an element and the concrete toolbox' view implementation.Several
ToolboxActioninstances can be added in this toolbox, depending on the current context. On the other hand, this toolbox uses a concrete inmutable view, given at instance construction time, which finally displays the toolbox' actions as toolbox' button in the canvas.
-
-
Constructor Summary
Constructors Constructor Description ActionsToolbox(Supplier<AbstractCanvasHandler> canvasHandlerSupplier, org.kie.workbench.common.stunner.core.graph.Element<?> element, V view)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionsToolboxadd(ToolboxAction<AbstractCanvasHandler> action)voiddestroy()AbstractCanvasgetCanvas()AbstractCanvasHandlergetCanvasHandler()StringgetElementUUID()org.kie.workbench.common.stunner.core.definition.shape.GlyphgetGlyph(ToolboxAction<AbstractCanvasHandler> action)org.kie.workbench.common.stunner.core.client.shape.Shape<?>getShape()StringgetTitle(ToolboxAction<AbstractCanvasHandler> action)VgetView()ActionsToolboxhide()voidhideAndDestroy()ActionsToolbox<V>init()Iterator<ToolboxAction>iterator()ActionsToolboxshow()intsize()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
ActionsToolbox
public ActionsToolbox(Supplier<AbstractCanvasHandler> canvasHandlerSupplier, org.kie.workbench.common.stunner.core.graph.Element<?> element, V view)
-
-
Method Detail
-
init
public ActionsToolbox<V> init()
-
add
public ActionsToolbox add(ToolboxAction<AbstractCanvasHandler> action)
-
iterator
public Iterator<ToolboxAction> iterator()
- Specified by:
iteratorin interfaceIterable<V extends ActionsToolboxView<?>>
-
size
public int size()
-
getElementUUID
public String getElementUUID()
-
getCanvasHandler
public AbstractCanvasHandler getCanvasHandler()
-
getCanvas
public AbstractCanvas getCanvas()
-
getShape
public org.kie.workbench.common.stunner.core.client.shape.Shape<?> getShape()
-
show
public ActionsToolbox show()
- Specified by:
showin interfaceorg.kie.workbench.common.stunner.core.client.components.toolbox.Toolbox<V extends ActionsToolboxView<?>>
-
hide
public ActionsToolbox hide()
- Specified by:
hidein interfaceorg.kie.workbench.common.stunner.core.client.components.toolbox.Toolbox<V extends ActionsToolboxView<?>>
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.kie.workbench.common.stunner.core.client.components.toolbox.Toolbox<V extends ActionsToolboxView<?>>
-
hideAndDestroy
public void hideAndDestroy()
- Specified by:
hideAndDestroyin interfaceorg.kie.workbench.common.stunner.core.client.components.toolbox.Toolbox<V extends ActionsToolboxView<?>>
-
getView
public V getView()
-
getGlyph
public org.kie.workbench.common.stunner.core.definition.shape.Glyph getGlyph(ToolboxAction<AbstractCanvasHandler> action)
-
getTitle
public String getTitle(ToolboxAction<AbstractCanvasHandler> action)
-
-