org.openide.loaders
Class DataShadow.ShadowNode

java.lang.Object
  |
  +--java.beans.FeatureDescriptor
        |
        +--org.openide.nodes.Node
              |
              +--org.openide.nodes.FilterNode
                    |
                    +--org.openide.loaders.DataShadow.ShadowNode
Enclosing class:
DataShadow

protected static class DataShadow.ShadowNode
extends FilterNode

Node for a shadow object.


Inner classes inherited from class org.openide.nodes.FilterNode
FilterNode.Children, FilterNode.NodeAdapter, FilterNode.PropertyChangeAdapter
 
Inner classes inherited from class org.openide.nodes.Node
Node.Cookie, Node.Handle, Node.IndexedProperty, Node.Property, Node.PropertySet
 
Fields inherited from class org.openide.nodes.FilterNode
DELEGATE_DESTROY, DELEGATE_GET_ACTIONS, DELEGATE_GET_CONTEXT_ACTIONS, DELEGATE_GET_DISPLAY_NAME, DELEGATE_GET_NAME, DELEGATE_GET_SHORT_DESCRIPTION, DELEGATE_SET_DISPLAY_NAME, DELEGATE_SET_NAME, DELEGATE_SET_SHORT_DESCRIPTION
 
Fields inherited from class org.openide.nodes.Node
EMPTY, PROP_COOKIE, PROP_DISPLAY_NAME, PROP_ICON, PROP_NAME, PROP_OPENED_ICON, PROP_PARENT_NODE, PROP_PROPERTY_SETS, PROP_SHORT_DESCRIPTION
 
Constructor Summary
DataShadow.ShadowNode(DataShadow shadow)
          Create a shadowing node.
 
Method Summary
 boolean canCopy()
          Test whether this node permits copying.
 boolean canCut()
          Test whether this node permits cutting.
 boolean canDestroy()
          Test whether this node can be deleted.
 boolean canRename()
          Test whether this node can be renamed.
 Transferable clipboardCopy()
          Copy this node to the clipboard.
 Transferable clipboardCut()
          Cut this node to the clipboard.
 Node cloneNode()
          Create new filter node for the original.
protected  NodeListener createNodeListener()
          Creates a node listener that allows listening on the original node and propagating events to the proxy.
 void destroy()
          Remove the node from its parent and deletes it.
 Transferable drag()
          This implementation only calls clipboardCopy supposing that copy to clipboard and copy by d'n'd are similar.
 boolean equals(Object o)
          Equal if the o is ShadowNode to the same shadow object.
 Node.Cookie getCookie(Class cl)
          Get a cookie for this node.
 String getDisplayName()
           
 Image getIcon(int type)
          Find an icon for this node (in the closed state).
 String getName()
          The name of the shadow.
 Image getOpenedIcon(int type)
          Find an icon for this node (in the open state).
 Node.PropertySet[] getPropertySets()
          Returns modified properties of the original node.
 String getShortDescription()
           
 int hashCode()
          Hashcode is computed by the represented shadow.
 void setName(String name)
          Set the system name.
 
Methods inherited from class org.openide.nodes.FilterNode
changeOriginal, createPropertyChangeListener, disableDelegation, enableDelegation, finalize, getActions, getContextActions, getCustomizer, getDefaultAction, getDropType, getHandle, getHelpCtx, getNewTypes, getOriginal, getPasteTypes, hasCustomizer, setDisplayName, setShortDescription
 
Methods inherited from class org.openide.nodes.Node
addNodeListener, addPropertyChangeListener, clone, fireCookieChange, fireDisplayNameChange, fireIconChange, fireNameChange, fireNodeDestroyed, fireOpenedIconChange, firePropertyChange, firePropertySetsChange, fireShortDescriptionChange, getChildren, getContextMenu, getParentNode, hasPropertyChangeListener, isLeaf, removeNodeListener, removePropertyChangeListener, toString
 
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getValue, isExpert, isHidden, isPreferred, setExpert, setHidden, setPreferred, setValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataShadow.ShadowNode

public DataShadow.ShadowNode(DataShadow shadow)
Create a shadowing node.
Parameters:
shadow - the shadow
Method Detail

cloneNode

public Node cloneNode()
Description copied from class: FilterNode
Create new filter node for the original. Subclasses do not have to override this, but if they do not, the default implementation will filter the subclass filter, which is not very efficient.
Overrides:
cloneNode in class FilterNode
Following copied from class: org.openide.nodes.FilterNode
Returns:
copy of this node

setName

public void setName(String name)
Description copied from class: Node
Set the system name. Fires a property change event.
Overrides:
setName in class FilterNode
Following copied from class: org.openide.nodes.Node
Parameters:
s - the new name
Throws:
IllegalArgumentException - if the new name cannot represent a valid node name

getName

public String getName()
The name of the shadow.
Overrides:
getName in class FilterNode
Returns:
the name

getDisplayName

public String getDisplayName()
Overrides:
getDisplayName in class FilterNode

getShortDescription

public String getShortDescription()
Overrides:
getShortDescription in class FilterNode

getIcon

public Image getIcon(int type)
Description copied from class: Node
Find an icon for this node (in the closed state).
Overrides:
getIcon in class FilterNode
Following copied from class: org.openide.nodes.Node
Parameters:
type - constant from BeanInfo
Returns:
icon to use to represent the node

getOpenedIcon

public Image getOpenedIcon(int type)
Description copied from class: Node
Find an icon for this node (in the open state). This icon is used when the node may have children and is expanded.
Overrides:
getOpenedIcon in class FilterNode
Following copied from class: org.openide.nodes.Node
Parameters:
type - constant from BeanInfo
Returns:
icon to use to represent the node when open

canDestroy

public boolean canDestroy()
Description copied from class: Node
Test whether this node can be deleted.
Overrides:
canDestroy in class FilterNode
Following copied from class: org.openide.nodes.Node
Returns:
true if can

destroy

public void destroy()
             throws IOException
Description copied from class: Node
Remove the node from its parent and deletes it. The default implementation obtains write access to the children's lock, and removes the node from its parent (if any). Also fires a property change.

This may be overridden by subclasses to do any additional cleanup.

Overrides:
destroy in class FilterNode
Following copied from class: org.openide.nodes.Node
Throws:
IOException - if something fails

canRename

public final boolean canRename()
Description copied from class: Node
Test whether this node can be renamed. If true, one can use FeatureDescriptor.getName() to obtain the current name and Node.setName(java.lang.String) to change it.
Overrides:
canRename in class FilterNode
Returns:
true if shadow can be renamed

canCopy

public final boolean canCopy()
Description copied from class: Node
Test whether this node permits copying.
Overrides:
canCopy in class FilterNode
Following copied from class: org.openide.nodes.Node
Returns:
true if so

canCut

public final boolean canCut()
Description copied from class: Node
Test whether this node permits cutting.
Overrides:
canCut in class FilterNode
Following copied from class: org.openide.nodes.Node
Returns:
true if so

getCookie

public Node.Cookie getCookie(Class cl)
Description copied from class: Node
Get a cookie for this node.

The set of cookies can change. If a node changes its set of cookies, it fires a property change event with Node.PROP_COOKIE.

Overrides:
getCookie in class FilterNode
Following copied from class: org.openide.nodes.Node
Parameters:
type - the representation class of the cookie
Returns:
a cookie assignable to that class, or null if this node has no such cookie

getPropertySets

public Node.PropertySet[] getPropertySets()
Returns modified properties of the original node.
Overrides:
getPropertySets in class FilterNode
Returns:
property sets

clipboardCopy

public Transferable clipboardCopy()
                           throws IOException
Copy this node to the clipboard.
Overrides:
clipboardCopy in class FilterNode
Returns:
ExTransferable.Single with one copy flavor
Throws:
IOException - if it could not copy
See Also:
NodeTransfer

clipboardCut

public Transferable clipboardCut()
                          throws IOException
Cut this node to the clipboard.
Overrides:
clipboardCut in class FilterNode
Returns:
ExTransferable.Single with one cut flavor
Throws:
IOException - if it could not cut
See Also:
NodeTransfer

drag

public Transferable drag()
                  throws IOException
This implementation only calls clipboardCopy supposing that copy to clipboard and copy by d'n'd are similar.
Overrides:
drag in class FilterNode
Returns:
transferable to represent this node during a drag
Throws:
IOException - when the cut cannot be performed

createNodeListener

protected NodeListener createNodeListener()
Creates a node listener that allows listening on the original node and propagating events to the proxy.

Intended for overriding by subclasses, as with FilterNode.createPropertyChangeListener().

Overrides:
createNodeListener in class FilterNode
Returns:
a FilterNode.NodeAdapter in the default implementation

equals

public boolean equals(Object o)
Equal if the o is ShadowNode to the same shadow object.
Overrides:
equals in class FilterNode
Following copied from class: org.openide.nodes.FilterNode
Parameters:
o - something to compare to, presumably a node or FilterNode of one
Returns:
true if this node's original node is the same as the parameter (or original node of parameter)

hashCode

public int hashCode()
Hashcode is computed by the represented shadow.
Overrides:
hashCode in class FilterNode
Following copied from class: org.openide.nodes.FilterNode
Returns:
the delegated hash code


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.