/** * Creates a connection widget with a specific router. * @param scene the scene * @param router the router */ public VMDConnectionWidget (Scene scene, Router router) { this (scene, VMDFactory.getOriginalScheme ()); if (router != null) setRouter (router); }
/** * Creates a connection widget with a specific router. * @param scene the scene * @param router the router */ public VMDConnectionWidget (Scene scene, Router router) { this (scene, VMDFactory.getOriginalScheme ()); if (router != null) setRouter (router); }
public Widget create (FlowEdgeDescriptor descriptor, FlowScene scene) { VMDConnectionWidget widget = new VMDConnectionWidget (scene, VMDFactory.getNetBeans60Scheme ()); widget.setRouter (scene.createEdgeRouter ()); scene.addEdgeCommonActions (widget); widget.getActions ().addAction (scene.createMoveControlPointAction ()); return widget; }
/** * Implements attaching a widget to an edge. the widget is ConnectionWidget and has object-hover, select and move-control-point actions. * @param edge the edge * @return the widget attached to the edge */ protected Widget attachEdgeWidget (String edge) { VMDConnectionWidget connectionWidget = new VMDConnectionWidget (this, scheme); connectionWidget.setRouter (router); connectionLayer.addChild (connectionWidget); connectionWidget.getActions ().addAction (createObjectHoverAction ()); connectionWidget.getActions ().addAction (createSelectAction ()); connectionWidget.getActions ().addAction (moveControlPointAction); return connectionWidget; }
/** * Implements attaching a widget to an edge. the widget is ConnectionWidget and has object-hover, select and move-control-point actions. * @param edge the edge * @return the widget attached to the edge */ protected Widget attachEdgeWidget (String edge) { VMDConnectionWidget connectionWidget = new VMDConnectionWidget (this, scheme); connectionWidget.setRouter (router); connectionLayer.addChild (connectionWidget); connectionWidget.getActions ().addAction (createObjectHoverAction ()); connectionWidget.getActions ().addAction (createSelectAction ()); connectionWidget.getActions ().addAction (moveControlPointAction); return connectionWidget; }