/** Takes array of nodes and creates array of handles. The nodes that do not * have handles are not included in the resulting array. * * @param nodes array of nodes * @return array of Node.Handles */ public static Node.Handle[] toHandles(Node[] nodes) { List<Node.Handle> ll = new LinkedList<Node.Handle>(); for (Node n : nodes) { Node.Handle h = n.getHandle(); if (h != null) { ll.add(h); } } return ll.toArray(new Node.Handle[ll.size()]); }
/** If this is FilterNode without any changes (subclassed, changed children) * and the original provides handle, stores them and * returns a new handle for the proxy. * <p>Subclasses <strong>must</strong> override this if they wish for their nodes to be * properly serializable. * * @return the handle, or <code>null</code> if this node is subclassed or * uses changed children */ public Node.Handle getHandle() { if (!isDefault()) { // subclasses has to implement the method by its own return null; } Node.Handle original = this.original.getHandle(); if (original == null) { // no original handle => no handle here return null; } return new FilterHandle(original); }
Node.Handle parentHandle = parentNode.getHandle();
/** Takes array of nodes and creates array of handles. The nodes that do not * have handles are not included in the resulting array. * * @param nodes array of nodes * @return array of Node.Handles */ public static Node.Handle[] toHandles (Node[] nodes) { LinkedList ll = new LinkedList (); for (int i = 0; i < nodes.length; i++) { Node.Handle h = nodes[i].getHandle(); if (h != null) { ll.add (h); } } return (Node.Handle[])ll.toArray (new Node.Handle[ll.size ()]); }
/** Takes array of nodes and creates array of handles. The nodes that do not * have handles are not included in the resulting array. * * @param nodes array of nodes * @return array of Node.Handles */ public static Node.Handle[] toHandles (Node[] nodes) { LinkedList ll = new LinkedList (); for (int i = 0; i < nodes.length; i++) { Node.Handle h = nodes[i].getHandle(); if (h != null) { ll.add (h); } } return (Node.Handle[])ll.toArray (new Node.Handle[ll.size ()]); }
public Node.Handle getHandle() { return getOriginal().getHandle(); } // #17920: Index cookie works only when equality works
/** Serialize this top component. * Subclasses wishing to store state must call the super method, then write to the stream. * @param out the stream to serialize to */ public void writeExternal (ObjectOutput out) throws IOException { out.writeObject(new Short (serialVersion)); out.writeInt (closeOperation); out.writeObject (getName()); out.writeObject (getToolTipText()); Node.Handle h = nodeName == null ? null : nodeName.node.getHandle (); out.writeObject(h); }
/** Serialize this top component. * Subclasses wishing to store state must call the super method, then write to the stream. * @param out the stream to serialize to */ public void writeExternal (ObjectOutput out) throws IOException { out.writeObject(new Short (serialVersion)); out.writeInt (closeOperation); out.writeObject (getName()); out.writeObject (getToolTipText()); Node.Handle h = nodeName == null ? null : nodeName.node.getHandle (); out.writeObject(h); }
/** If this is FilterNode without any changes (subclassed, changed children) * and the original provides handle, stores them and * returns a new handle for the proxy. * <p>Subclasses <strong>must</strong> override this if they wish for their nodes to be * properly serializable. * * @return the handle, or <code>null</code> if this node is subclassed or * uses changed children */ public Node.Handle getHandle () { if (!isDefault ()) { // subclasses has to implement the method by its own return null; } Node.Handle original = this.original.getHandle (); if (original == null) { // no original handle => no handle here return null; } return new FilterHandle (original); }
/** If this is FilterNode without any changes (subclassed, changed children) * and the original provides handle, stores them and * returns a new handle for the proxy. * <p>Subclasses <strong>must</strong> override this if they wish for their nodes to be * properly serializable. * * @return the handle, or <code>null</code> if this node is subclassed or * uses changed children */ public Node.Handle getHandle () { if (!isDefault ()) { // subclasses has to implement the method by its own return null; } Node.Handle original = this.original.getHandle (); if (original == null) { // no original handle => no handle here return null; } return new FilterHandle (original); }
list.add (persistent ? new Pair (type, listener.getHandle ()) : new Pair (type, listener));
Node.Handle rCH = rootContext.getHandle(); fields.put("root", rCH); // NOI18N
Node.Handle rCH = rootContext.getHandle (); fields.put ("root", rCH); // NOI18N
Node.Handle rCH = rootContext.getHandle (); fields.put ("root", rCH); // NOI18N
Node.Handle parentHandle = parentNode.getHandle (); if (parentHandle == null) return null; return new DefaultHandle (parentHandle, childPath);
Node.Handle parentHandle = parentNode.getHandle (); if (parentHandle == null) return null; return new DefaultHandle (parentHandle, childPath);