public void installUI (VMDConnectionWidget widget) { widget.setSourceAnchorShape (AnchorShape.NONE); widget.setTargetAnchorShape (AnchorShape.TRIANGLE_FILLED); widget.setPaintControlPoints (true); }
connectionWidget = new VMDConnectionWidget(this, scheme); } else { connectionWidget = new VMDConnectionWidget(this, new PFENotModifiableScheme()); getNodes().size() > MAX_PAGES || getEdges().size() + getNodes().size() > MAX_ELEMENTS) { connectionWidget.setRouter(routerDirect); } else { connectionWidget.setRouter(router); connectionWidget.getActions().addAction(createObjectHoverAction()); connectionWidget.getActions().addAction(selectAction); connectionWidget.getActions().addAction(moveControlPointAction); connectionWidget.getActions().addAction(doubleClickAction); connectionWidget.setLayout(new ConnectionWrapperLayout(connectionWidget, label)); connectionWidget.setConstraint(label, LayoutFactory.ConnectionWidgetLayoutAlignment.TOP_RIGHT, 10); connectionWidget.addChild(label);
/** * 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; }
public void updateUI (VMDConnectionWidget widget, ObjectState previousState, ObjectState state) { if (state.isSelected ()) widget.setForeground (COLOR60_SELECT); else if (state.isHighlighted ()) widget.setForeground (VMDOriginalColorScheme.COLOR_HIGHLIGHTED); else if (state.isHovered () || state.isFocused ()) widget.setForeground (COLOR60_HOVER); else widget.setForeground (VMDOriginalColorScheme.COLOR_NORMAL); if (state.isSelected () || state.isHovered ()) { widget.setControlPointShape (PointShape.SQUARE_FILLED_SMALL); widget.setEndPointShape (PointShape.SQUARE_FILLED_BIG); widget.setControlPointCutDistance (0); } else { widget.setControlPointShape (PointShape.NONE); widget.setEndPointShape (POINT_SHAPE60_IMAGE); widget.setControlPointCutDistance (5); } }
public void updateUI (VMDConnectionWidget widget, ObjectState previousState, ObjectState state) { if (state.isHovered ()) widget.setForeground (COLOR_HOVERED); else if (state.isSelected ()) widget.setForeground (COLOR_SELECTED); else if (state.isHighlighted ()) widget.setForeground (COLOR_HIGHLIGHTED); else if (state.isFocused ()) widget.setForeground (COLOR_HOVERED); else widget.setForeground (COLOR_NORMAL); if (state.isSelected ()) { widget.setControlPointShape (PointShape.SQUARE_FILLED_SMALL); widget.setEndPointShape (PointShape.SQUARE_FILLED_BIG); } else { widget.setControlPointShape (PointShape.NONE); widget.setEndPointShape (POINT_SHAPE_IMAGE); } }
/** * 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); }
/** * 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; }
public void updateUI (VMDConnectionWidget widget, ObjectState previousState, ObjectState state) { if (state.isSelected ()) widget.setForeground (COLOR60_SELECT); else if (state.isHighlighted ()) widget.setForeground (VMDOriginalColorScheme.COLOR_HIGHLIGHTED); else if (state.isHovered () || state.isFocused ()) widget.setForeground (COLOR60_HOVER); else widget.setForeground (VMDOriginalColorScheme.COLOR_NORMAL); if (state.isSelected () || state.isHovered ()) { widget.setControlPointShape (PointShape.SQUARE_FILLED_SMALL); widget.setEndPointShape (PointShape.SQUARE_FILLED_BIG); widget.setControlPointCutDistance (0); } else { widget.setControlPointShape (PointShape.NONE); widget.setEndPointShape (POINT_SHAPE60_IMAGE); widget.setControlPointCutDistance (5); } }
public void updateUI (VMDConnectionWidget widget, ObjectState previousState, ObjectState state) { if (state.isHovered ()) widget.setForeground (COLOR_HOVERED); else if (state.isSelected ()) widget.setForeground (COLOR_SELECTED); else if (state.isHighlighted ()) widget.setForeground (COLOR_HIGHLIGHTED); else if (state.isFocused ()) widget.setForeground (COLOR_HOVERED); else widget.setForeground (COLOR_NORMAL); if (state.isSelected ()) { widget.setControlPointShape (PointShape.SQUARE_FILLED_SMALL); widget.setEndPointShape (PointShape.SQUARE_FILLED_BIG); } else { widget.setControlPointShape (PointShape.NONE); widget.setEndPointShape (POINT_SHAPE_IMAGE); } }
/** * 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; }
public void updateUI (VMDConnectionWidget widget, ObjectState previousState, ObjectState state) { if (state.isSelected ()) { widget.setForeground (COLOR60_SELECT); } else if (state.isHighlighted ()) { widget.setForeground (COLOR_HIGHLIGHTED); } else if (state.isHovered () || state.isFocused ()) { widget.setForeground (COLOR60_HOVER); } else { widget.setForeground (COLOR_NORMAL); } if (state.isSelected () || state.isHovered ()) { widget.setControlPointShape (PointShape.SQUARE_FILLED_SMALL); widget.setEndPointShape (PointShape.SQUARE_FILLED_BIG); widget.setControlPointCutDistance (0); } else { widget.setControlPointShape (PointShape.NONE); widget.setEndPointShape (POINT_SHAPE_IMAGE); widget.setControlPointCutDistance (5); } }
public void installUI (VMDConnectionWidget widget) { widget.setSourceAnchorShape (AnchorShape.NONE); widget.setTargetAnchorShape (AnchorShape.TRIANGLE_FILLED); widget.setPaintControlPoints (true); }
public void installUI (VMDConnectionWidget widget) { widget.setSourceAnchorShape (AnchorShape.NONE); widget.setTargetAnchorShape (AnchorShape.TRIANGLE_FILLED); widget.setPaintControlPoints (true); }
public void installUI (VMDConnectionWidget widget) { widget.setSourceAnchorShape (AnchorShape.NONE); widget.setTargetAnchorShape (AnchorShape.TRIANGLE_FILLED); widget.setPaintControlPoints (true); }
public void installUI (VMDConnectionWidget widget) { widget.setSourceAnchorShape (AnchorShape.NONE); widget.setTargetAnchorShape (AnchorShape.TRIANGLE_FILLED); widget.setPaintControlPoints (true); }