/** Fired when a set of children is removed. * @param ev event describing the action */ public void childrenRemoved(NodeMemberEvent ev) { VisualizerChildren ch = children.get(); LOG.log(Level.FINER, "childrenRemoved event: {0}\n ch: {1}", new Object[]{ev, ch}); // NOI18N if (ch == null) { LOG.log(Level.FINER, "childrenRemoved - exit"); // NOI18N return; } QUEUE.runSafe(new VisualizerEvent.Removed(ch, ev.getDeltaIndices(), ev)); LOG.log(Level.FINER, "childrenRemoved - end"); // NOI18N }
/** Fired when a set of new children is added. * @param ev event describing the action */ public void childrenAdded(NodeMemberEvent ev) { VisualizerChildren ch = children.get(); LOG.log(Level.FINER, "childrenAdded event: {0}\n ch: {1}", new Object[]{ev, ch}); // NOI18N if (ch == null) { LOG.log(Level.FINER, "childrenAdded - exit"); // NOI18N return; } QUEUE.runSafe(new VisualizerEvent.Added(ch, ev.getDeltaIndices(), ev)); LOG.log(Level.FINER, "childrenAdded - end"); // NOI18N }
/** Fired when the order of children is changed. * @param ev event describing the change */ public void childrenReordered(NodeReorderEvent ev) { VisualizerChildren ch = children.get(); int[] perm = ev.getPermutation(); LOG.log(Level.FINER, "childrenReordered {0}\n ch: {1}", new Object[]{perm, ch}); // NOI18N if (ch == null) { LOG.log(Level.FINER, "childrenReordered - exit"); // NOI18N return; } QUEUE.runSafe(new VisualizerEvent.Reordered(ch, perm, ev)); LOG.log(Level.FINER, "childrenReordered - end"); // NOI18N }
/** Change in the node properties (icon, etc.) */ public void propertyChange(final java.beans.PropertyChangeEvent evt) { String name = evt.getPropertyName(); boolean isIconChange = Node.PROP_ICON.equals(name) || Node.PROP_OPENED_ICON.equals(name); if (Node.PROP_NAME.equals(name) || Node.PROP_DISPLAY_NAME.equals(name) || isIconChange) { if (isIconChange) { //Ditch the cached icon type so the next call to getIcon() will //recreate the Icon cachedIconType = -1; } if (Node.PROP_DISPLAY_NAME.equals(name)) { htmlDisplayName = null; } QUEUE.runSafe(this); return; } // bugfix #37748, VisualizerNode ignores change of short desc if it is not read yet (set to UNKNOWN) if (Node.PROP_SHORT_DESCRIPTION.equals(name) && (shortDescription != UNKNOWN)) { QUEUE.runSafe(this); return; } if (Node.PROP_LEAF.equals(name)) { QUEUE.runSafe(new PropLeafChange()); return; } }
static void runSafe(Runnable run) { QUEUE.runSafe(run); }
/** Fired when a set of children is removed. * @param ev event describing the action */ public void childrenRemoved(NodeMemberEvent ev) { VisualizerChildren ch = (VisualizerChildren)children.get (); if (ch == null) return; QUEUE.runSafe (new VisualizerEvent.Removed (ch, ev.getDelta ()) ); }
/** Fired when a set of new children is added. * @param ev event describing the action */ public void childrenAdded(NodeMemberEvent ev) { VisualizerChildren ch = (VisualizerChildren)children.get (); if (ch == null) return; QUEUE.runSafe (new VisualizerEvent.Added ( ch, ev.getDelta (), ev.getDeltaIndices () )); }
void doChildrenReordered (int[] perm) { VisualizerChildren ch = (VisualizerChildren)children.get (); if (ch == null) return; QUEUE.runSafe (new VisualizerEvent.Reordered (ch, perm)); }
/** Fired when a set of children is removed. * @param ev event describing the action */ public void childrenRemoved(NodeMemberEvent ev) { VisualizerChildren ch = (VisualizerChildren)children.get (); if (ch == null) return; QUEUE.runSafe (new VisualizerEvent.Removed (ch, ev.getDelta ()) ); }
void doChildrenReordered (int[] perm) { VisualizerChildren ch = (VisualizerChildren)children.get (); if (ch == null) return; QUEUE.runSafe (new VisualizerEvent.Reordered (ch, perm)); }
/** Fired when a set of new children is added. * @param ev event describing the action */ public void childrenAdded(NodeMemberEvent ev) { VisualizerChildren ch = (VisualizerChildren)children.get (); if (ch == null) return; QUEUE.runSafe (new VisualizerEvent.Added ( ch, ev.getDelta (), ev.getDeltaIndices () )); }
/** Fired when the node is deleted. * @param ev event describing the node */ @Override public void nodeDestroyed(NodeEvent ev) { node = Node.EMPTY; QUEUE.runSafe(new VisualizerEvent.Destroyed(getChildren(false), ev, this)); }