Package org.openbp.cockpit.modeler.tools

Examples of org.openbp.cockpit.modeler.tools.SimpleSelectTool


  public static void setupToolSupport(ModelerToolSupport toolSupport, boolean isModeler)
  {
    ModelerTool tool;

    // Process variable -> select
    tool = new SimpleSelectTool(toolSupport);
    toolSupport.addToolDecisionTableEntry(tool, ProcessVariableFigure.class, 0);

    // Process variable -> select
    tool = new SimpleSelectTool(toolSupport);
    toolSupport.addToolDecisionTableEntry(tool, ProcessVariableConnection.class, 0);

    // Flow connection -> select
    tool = new SimpleSelectTool(toolSupport);
    tool.setToolCursor(ModelerGraphics.moveSplinePointCursor);
    tool.setToolHintMsg(ModelerGraphics.getMsg("msg.spline"));
    toolSupport.addToolDecisionTableEntry(tool, FlowConnection.class, 0);

    // Param connection -> select
    tool = new SimpleSelectTool(toolSupport);
    tool.setToolCursor(ModelerGraphics.moveSplinePointCursor);
    tool.setToolHintMsg(ModelerGraphics.getMsg("msg.spline"));
    toolSupport.addToolDecisionTableEntry(tool, ParamConnection.class, 0);

    // Text element -> drag
    tool = new XDragTracker(toolSupport);
    tool.setToolCursor(ModelerGraphics.moveTextCursor);
    tool.setToolHintMsg(ModelerGraphics.getMsg("msg.textelement"));
    toolSupport.addToolDecisionTableEntry(tool, TextElementFigure.class, 0);

    // Horizontal line -> drag
    tool = new XDragTracker(toolSupport);
    tool.setToolCursor(ModelerGraphics.moveHLineCursor);
    tool.setToolHintMsg(ModelerGraphics.getMsg("msg.line"));
    toolSupport.addToolDecisionTableEntry(tool, HLineFigure.class, 0);

    // Vertical line -> drag
    tool = new XDragTracker(toolSupport);
    tool.setToolCursor(ModelerGraphics.moveVLineCursor);
    tool.setToolHintMsg(ModelerGraphics.getMsg("msg.line"));
    toolSupport.addToolDecisionTableEntry(tool, VLineFigure.class, 0);

    if (isModeler)
    {
      // Node -> drag
      tool = new XDragTracker(toolSupport);
      tool.setToolCursor(ModelerGraphics.moveNodeCursor);
      tool.setToolHintMsg(ModelerGraphics.getMsg("msg.node"));
      toolSupport.addToolDecisionTableEntry(tool, NodeFigure.class, 0);
    }
    else
    {
      // Node -> select
      tool = new SimpleSelectTool(toolSupport);
      tool.setToolCursor(ModelerGraphics.moveNodeCursor);
      tool.setToolHintMsg(ModelerGraphics.getMsg("msg.nodefixed"));
      toolSupport.addToolDecisionTableEntry(tool, NodeFigure.class, 0);
    }
View Full Code Here

TOP

Related Classes of org.openbp.cockpit.modeler.tools.SimpleSelectTool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.