Ejemplo n.º 1
0
 public void propertyChange(java.beans.PropertyChangeEvent ev) {
   if (Node.PROP_DISPLAY_NAME.equals(ev.getPropertyName())) {
     updateTitles();
   }
   if (Node.PROP_ICON.equals(ev.getPropertyName())) {
     DataObject obj = getDataObject();
     if (obj.isValid()) {
       editor.setIcon(obj.getNodeDelegate().getIcon(java.beans.BeanInfo.ICON_COLOR_16x16));
     }
   }
 }
Ejemplo n.º 2
0
 /** Overrides superclass method. Initializes editor component. */
 protected void initializeCloneableEditor(CloneableEditor editor) {
   DataObject obj = getDataObject();
   if (obj.isValid()) {
     org.openide.nodes.Node ourNode = obj.getNodeDelegate();
     editor.setActivatedNodes(new org.openide.nodes.Node[] {ourNode});
     editor.setIcon(ourNode.getIcon(java.beans.BeanInfo.ICON_COLOR_16x16));
     NodeListener nl = new DataNodeListener(editor);
     ourNode.addNodeListener(WeakListener.node(nl, ourNode));
     nodeL = nl;
   }
 }