Search in sources :

Example 1 with Toolbar

use of org.kie.workbench.common.stunner.client.widgets.toolbar.Toolbar in project kie-wb-common by kiegroup.

the class ManagedToolbar method load.

@Override
public void load(final S session) {
    final Diagram diagram = session.getCanvasHandler().getDiagram();
    final Annotation qualifier = definitionUtils.getQualifier(diagram.getMetadata().getDefinitionSetId());
    // Initialize the command and view instances.
    commandTypes.stream().map(type -> loadCommand(type, qualifier)).forEach(this::registerCommand);
    // Show the toolbar.
    show(session);
}
Also used : InstanceUtils(org.kie.workbench.common.stunner.core.client.session.impl.InstanceUtils) DefinitionUtils(org.kie.workbench.common.stunner.core.util.DefinitionUtils) ToolbarView(org.kie.workbench.common.stunner.client.widgets.toolbar.ToolbarView) ManagedInstance(org.jboss.errai.ioc.client.api.ManagedInstance) ClientSession(org.kie.workbench.common.stunner.core.client.session.ClientSession) AbstractToolbarItem(org.kie.workbench.common.stunner.client.widgets.toolbar.item.AbstractToolbarItem) Inject(javax.inject.Inject) AbstractToolbarCommand(org.kie.workbench.common.stunner.client.widgets.toolbar.command.AbstractToolbarCommand) List(java.util.List) Dependent(javax.enterprise.context.Dependent) Annotation(java.lang.annotation.Annotation) PostConstruct(javax.annotation.PostConstruct) Any(javax.enterprise.inject.Any) LinkedList(java.util.LinkedList) Toolbar(org.kie.workbench.common.stunner.client.widgets.toolbar.Toolbar) ToolbarCommand(org.kie.workbench.common.stunner.client.widgets.toolbar.ToolbarCommand) Diagram(org.kie.workbench.common.stunner.core.diagram.Diagram) Annotation(java.lang.annotation.Annotation) Diagram(org.kie.workbench.common.stunner.core.diagram.Diagram)

Aggregations

Annotation (java.lang.annotation.Annotation)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 PostConstruct (javax.annotation.PostConstruct)1 Dependent (javax.enterprise.context.Dependent)1 Any (javax.enterprise.inject.Any)1 Inject (javax.inject.Inject)1 ManagedInstance (org.jboss.errai.ioc.client.api.ManagedInstance)1 Toolbar (org.kie.workbench.common.stunner.client.widgets.toolbar.Toolbar)1 ToolbarCommand (org.kie.workbench.common.stunner.client.widgets.toolbar.ToolbarCommand)1 ToolbarView (org.kie.workbench.common.stunner.client.widgets.toolbar.ToolbarView)1 AbstractToolbarCommand (org.kie.workbench.common.stunner.client.widgets.toolbar.command.AbstractToolbarCommand)1 AbstractToolbarItem (org.kie.workbench.common.stunner.client.widgets.toolbar.item.AbstractToolbarItem)1 ClientSession (org.kie.workbench.common.stunner.core.client.session.ClientSession)1 InstanceUtils (org.kie.workbench.common.stunner.core.client.session.impl.InstanceUtils)1 Diagram (org.kie.workbench.common.stunner.core.diagram.Diagram)1 DefinitionUtils (org.kie.workbench.common.stunner.core.util.DefinitionUtils)1