/** * Called to notify about the change of the widget state. * @param previousState the previous state * @param state the new state */ protected void notifyStateChanged (ObjectState previousState, ObjectState state) { scheme.updateUI (this, previousState, state); }
addChild (header); boolean right = scheme.isNodeMinimizeButtonOnRight (this); minimizeWidget = new ImageWidget (scene, scheme.getMinimizeWidgetImage (this)); minimizeWidget.setCursor (Cursor.getPredefinedCursor (Cursor.HAND_CURSOR)); minimizeWidget.getActions ().addAction (new ToggleMinimizedAction ()); stateModel.addListener (this); scheme.installUI (this); notifyStateChanged (ObjectState.createNormal (), ObjectState.createNormal ());
public Widget createPinCategoryWidget (VMDNodeWidget widget, String categoryDisplayName) { return VMDFactory.getOriginalScheme ().createPinCategoryWidget (widget, categoryDisplayName); }
/** * Creates a connection widget with a specific color scheme. * @param scene the scene * @param scheme the color scheme */ public VMDConnectionWidget (Scene scene, VMDColorScheme scheme) { super (scene); assert scheme != null; this.scheme = scheme; scheme.installUI (this); setState (ObjectState.createNormal ()); }
/** * Called when a minimized state is changed. This method will show/hide child widgets of this Widget and switches anchors between * node and pin widgets. */ public void stateChanged () { boolean minimized = stateModel.getBooleanState (); Rectangle rectangle = minimized ? new Rectangle () : null; for (Widget widget : getChildren ()) if (widget != header && widget != pinsSeparator) { getScene ().getSceneAnimator ().animatePreferredBounds (widget, minimized && isMinimizableWidget (widget) ? rectangle : null); } minimizeWidget.setImage (scheme.getMinimizeWidgetImage (this)); }
Entry[] bottomList = toArray (bottommap); int pinGap = scheme.getNodeAnchorGap (this); int y = bounds.y - pinGap; int x = bounds.x - pinGap;
addChild (header); boolean right = scheme.isNodeMinimizeButtonOnRight (this); minimizeWidget = new ImageWidget (scene, scheme.getMinimizeWidgetImage (this)); minimizeWidget.setCursor (Cursor.getPredefinedCursor (Cursor.HAND_CURSOR)); minimizeWidget.getActions ().addAction (new ToggleMinimizedAction ()); stateModel.addListener (this); scheme.installUI (this); notifyStateChanged (ObjectState.createNormal (), ObjectState.createNormal ());
private Widget createPinCategoryWidget (String categoryDisplayName) { Widget w = pinCategoryWidgets.get (categoryDisplayName); if (w != null) return w; Widget label = scheme.createPinCategoryWidget (this, categoryDisplayName); if (stateModel.getBooleanState ()) label.setPreferredBounds (new Rectangle ()); pinCategoryWidgets.put (categoryDisplayName, label); return label; }
/** * Creates a connection widget with a specific color scheme. * @param scene the scene * @param scheme the color scheme */ public VMDConnectionWidget (Scene scene, VMDColorScheme scheme) { super (scene); assert scheme != null; this.scheme = scheme; scheme.installUI (this); setState (ObjectState.createNormal ()); }
/** * Called when a minimized state is changed. This method will show/hide child widgets of this Widget and switches anchors between * node and pin widgets. */ public void stateChanged () { boolean minimized = stateModel.getBooleanState (); Rectangle rectangle = minimized ? new Rectangle () : null; for (Widget widget : getChildren ()) if (widget != header && widget != pinsSeparator) { getScene ().getSceneAnimator ().animatePreferredBounds (widget, minimized && isMinimizableWidget (widget) ? rectangle : null); } minimizeWidget.setImage (scheme.getMinimizeWidgetImage (this)); }
Entry[] bottomList = toArray (bottommap); int pinGap = scheme.getNodeAnchorGap (this); int y = bounds.y - pinGap; int x = bounds.x - pinGap;
private Widget createPinCategoryWidget (String categoryDisplayName) { Widget w = pinCategoryWidgets.get (categoryDisplayName); if (w != null) return w; Widget label = scheme.createPinCategoryWidget (this, categoryDisplayName); if (stateModel.getBooleanState ()) label.setPreferredBounds (new Rectangle ()); pinCategoryWidgets.put (categoryDisplayName, label); return label; }
/** * Called to notify about the change of the widget state. * @param previousState the previous state * @param state the new state */ protected void notifyStateChanged (ObjectState previousState, ObjectState state) { scheme.updateUI (this, previousState, state); }
/** * 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 ()); }
/** * Implements the widget-state specific look of the widget. * @param previousState the previous state * @param state the new state */ public void notifyStateChanged (ObjectState previousState, ObjectState state) { scheme.updateUI (this, previousState, state); }
/** * 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 ()); }
/** * Called to notify about the change of the widget state. * @param previousState the previous state * @param state the new state */ protected void notifyStateChanged (ObjectState previousState, ObjectState state) { scheme.updateUI (this, previousState, state); }
/** * Called to notify about the change of the widget state. * @param previousState the previous state * @param state the new state */ protected void notifyStateChanged (ObjectState previousState, ObjectState state) { scheme.updateUI (this, previousState, state); }
/** * Implements the widget-state specific look of the widget. * @param previousState the previous state * @param state the new state */ public void notifyStateChanged (ObjectState previousState, ObjectState state) { scheme.updateUI (this, previousState, state); }