Example #1
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;
   }
 }
Example #2
0
    /* Deserialize this top component.
     * @param in the stream to deserialize from
     */
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
      super.readExternal(in);

      Object ces = cloneableEditorSupport();
      if (ces instanceof Del) {
        obj = ((Del) ces).getDataObjectHack();
      }
    }
Example #3
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));
     }
   }
 }