public void installUI (VMDPinWidget widget) { widget.setBorder (BORDER_PIN); widget.setBackground (COLOR_SELECTED); widget.setOpaque (false); }
public void installUI (VMDPinWidget widget) { widget.setBorder (BORDER_PIN); widget.setBackground (COLOR60_HOVER_BACKGROUND); }
public Widget createWidget (FlowPinDescriptor descriptor, FlowScene scene) { VMDPinWidget vmdPinWidget = new VMDPinWidget (scene, VMDFactory.getNetBeans60Scheme ()); scene.addPinCommonActions (vmdPinWidget); vmdPinWidget.getActions ().addAction (0, scene.createRenameAction ()); return vmdPinWidget; }
/** * Implements attaching a widget to a pin. The widget is VMDPinWidget and has object-hover and select action. * The the node id ends with "#default" then the pin is the default pin of a node and therefore it is non-visual. * @param node the node * @param pinNode * @return the widget attached to the pin, null, if it is a default pin */ protected Widget attachPinWidget(Page pageNode, Pin pinNode) { assert pageNode != null; if (pinNode.isDefault()) { return null; } VMDPinWidget widget = new VMDPinWidget(this, scheme); VMDNodeWidget nodeWidget = (VMDNodeWidget) findWidget(pageNode); if (nodeWidget != null) { nodeWidget.attachPinWidget(widget); widget.setProperties(pinNode.getName(), Arrays.asList(pinNode.getIcon(0))); Chain actions = widget.getActions(); actions.addAction(createObjectHoverAction()); actions.addAction(createSelectAction()); actions.addAction(connectAction); actions.addAction(doubleClickAction); } else { System.err.println("Node widget should not be null."); } return widget; }
/** * Creates a pin widget with a specific color scheme. * @param scene the scene * @param scheme the color scheme */ public VMDPinWidget (Scene scene, VMDColorScheme scheme) { super (scene); assert scheme != null; this.scheme = scheme; setLayout (LayoutFactory.createHorizontalFlowLayout (LayoutFactory.SerialAlignment.CENTER, 8)); addChild (nameWidget = new LabelWidget (scene)); addChild (glyphsWidget = new VMDGlyphSetWidget (scene)); scheme.installUI (this); notifyStateChanged (ObjectState.createNormal (), ObjectState.createNormal ()); }
/** * Sets all pin properties at once. * @param name the pin name * @param glyphs the pin glyphs */ public void setProperties (String name, List<Image> glyphs) { setPinName (name); glyphsWidget.setGlyphs (glyphs); }
/** * Implements attaching a widget to a pin. The widget is VMDPinWidget and has object-hover and select action. * The the node id ends with "#default" then the pin is the default pin of a node and therefore it is non-visual. * @param node the node * @param pin the pin * @return the widget attached to the pin, null, if it is a default pin */ protected Widget attachPinWidget (String node, String pin) { if (pin.endsWith (PIN_ID_DEFAULT_SUFFIX)) return null; VMDPinWidget widget = new VMDPinWidget (this, scheme); ((VMDNodeWidget) findWidget (node)).attachPinWidget (widget); widget.getActions ().addAction (createObjectHoverAction ()); widget.getActions ().addAction (createSelectAction ()); return widget; }
public void installUI (VMDPinWidget widget) { widget.setBorder (VMDOriginalColorScheme.BORDER_PIN); widget.setBackground (COLOR60_HOVER_BACKGROUND); }
/** * Creates a pin widget with a specific color scheme. * @param scene the scene * @param scheme the color scheme */ public VMDPinWidget (Scene scene, VMDColorScheme scheme) { super (scene); assert scheme != null; this.scheme = scheme; setLayout (LayoutFactory.createHorizontalFlowLayout (LayoutFactory.SerialAlignment.CENTER, 8)); addChild (nameWidget = new LabelWidget (scene)); addChild (glyphsWidget = new VMDGlyphSetWidget (scene)); scheme.installUI (this); notifyStateChanged (ObjectState.createNormal (), ObjectState.createNormal ()); }
/** * Sets all pin properties at once. * @param name the pin name * @param glyphs the pin glyphs */ public void setProperties (String name, List<Image> glyphs) { setPinName (name); glyphsWidget.setGlyphs (glyphs); }
/** * Implements attaching a widget to a pin. The widget is VMDPinWidget and has object-hover and select action. * The the node id ends with "#default" then the pin is the default pin of a node and therefore it is non-visual. * @param node the node * @param pin the pin * @return the widget attached to the pin, null, if it is a default pin */ protected Widget attachPinWidget (String node, String pin) { if (pin.endsWith (PIN_ID_DEFAULT_SUFFIX)) return null; VMDPinWidget widget = new VMDPinWidget (this, scheme); ((VMDNodeWidget) findWidget (node)).attachPinWidget (widget); widget.getActions ().addAction (createObjectHoverAction ()); widget.getActions ().addAction (createSelectAction ()); return widget; }
public void installUI (VMDPinWidget widget) { widget.setBorder (BORDER_PIN); widget.setBackground (COLOR_SELECTED); widget.setOpaque (false); }
public void installUI (VMDPinWidget widget) { widget.setBorder (VMDOriginalColorScheme.BORDER_PIN); widget.setBackground (COLOR60_HOVER_BACKGROUND); }
public void update (FlowPinDescriptor descriptor, FlowScene scene) { VMDPinWidget widget = (VMDPinWidget) scene.findWidget (descriptor); widget.setPinName (FlowEventSourcePinPresenter.this.getDisplayName ()); }
public void updateUI (VMDPinWidget widget, ObjectState previousState, ObjectState state) { widget.setOpaque (state.isSelected ()); widget.setBorder (state.isFocused () || state.isHovered () ? BORDER_PIN_HOVERED : BORDER_PIN); // LookFeel lookFeel = getScene ().getLookFeel (); // setBorder (BorderFactory.createCompositeBorder (BorderFactory.createEmptyBorder (8, 2), lookFeel.getMiniBorder (state))); // setForeground (lookFeel.getForeground (state)); }
public void updateUI (VMDPinWidget widget, ObjectState previousState, ObjectState state) { widget.setOpaque (state.isSelected ()); widget.setBorder (state.isFocused () || state.isHovered () ? BORDER_PIN_HOVERED : BORDER_PIN); // LookFeel lookFeel = getScene ().getLookFeel (); // setBorder (BorderFactory.createCompositeBorder (BorderFactory.createEmptyBorder (8, 2), lookFeel.getMiniBorder (state))); // setForeground (lookFeel.getForeground (state)); }