org.openide.loaders
Class DataFolder.FolderNode

java.lang.Object
  |
  +--java.beans.FeatureDescriptor
        |
        +--org.openide.nodes.Node
              |
              +--org.openide.nodes.AbstractNode
                    |
                    +--org.openide.loaders.DataNode
                          |
                          +--org.openide.loaders.DataFolder.FolderNode
Enclosing class:
DataFolder

public class DataFolder.FolderNode
extends DataNode

Node for a folder.


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.AbstractNode
displayFormat, systemActions
 
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
protected DataFolder.FolderNode()
          Create a folder node with default folder children.
  DataFolder.FolderNode(Children ch)
          Create a folder node with some children.
 
Method Summary
protected  void createPasteTypes(Transferable t, List s)
          Accumulate the paste types that this node can handle for a given transferable.
protected  Sheet createSheet()
          Initialize a default property sheet; commonly overridden.
 Node.Cookie getCookie(Class clazz)
          Get a cookie.
 SystemAction getDefaultAction()
          Get default action.
 NewType[] getNewTypes()
          Get the new types that can be created in this node.
 
Methods inherited from class org.openide.loaders.DataNode
canCopy, canCut, canDestroy, canRename, clipboardCopy, clipboardCut, createActions, destroy, getActions, getDataObject, getDisplayName, getHandle, getHelpCtx, getIcon, getOpenedIcon, getShowFileExtensions, setName, setName, setShowFileExtensions
 
Methods inherited from class org.openide.nodes.AbstractNode
cloneNode, drag, getCookieSet, getCustomizer, getDropType, getPasteTypes, getPropertySets, getSheet, hasCustomizer, setCookieSet, setDefaultAction, setIconBase, setSheet
 
Methods inherited from class org.openide.nodes.Node
addNodeListener, addPropertyChangeListener, clone, fireCookieChange, fireDisplayNameChange, fireIconChange, fireNameChange, fireNodeDestroyed, fireOpenedIconChange, firePropertyChange, firePropertySetsChange, fireShortDescriptionChange, getChildren, getContextActions, getContextMenu, getParentNode, hasPropertyChangeListener, isLeaf, removeNodeListener, removePropertyChangeListener, setDisplayName, setShortDescription, toString
 
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setExpert, setHidden, setPreferred, setValue
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataFolder.FolderNode

public DataFolder.FolderNode(Children ch)
Create a folder node with some children.
Parameters:
ch - children to use for the node

DataFolder.FolderNode

protected DataFolder.FolderNode()
Create a folder node with default folder children.
Method Detail

getCookie

public Node.Cookie getCookie(Class clazz)
Description copied from class: DataNode
Get a cookie. First of all DataObject.getCookie(java.lang.Class) is called. If it produces non-null result, that is returned. Otherwise the superclass is tried.
Overrides:
getCookie in class DataNode
Following copied from class: org.openide.loaders.DataNode
Returns:
the cookie or null

createSheet

protected Sheet createSheet()
Description copied from class: AbstractNode
Initialize a default property sheet; commonly overridden. If AbstractNode.getSheet() is called and there is not yet a sheet, this method is called to allow a subclass to specify its properties.

Warning: Do not call getSheet in this method.

The default implementation returns an empty sheet.

Overrides:
createSheet in class DataNode
Following copied from class: org.openide.nodes.AbstractNode
Returns:
the sheet with initialized values (never null)

getDefaultAction

public SystemAction getDefaultAction()
Description copied from class: DataNode
Get default action. A data node may have a default action if it represents a template.
Overrides:
getDefaultAction in class DataNode
Following copied from class: org.openide.loaders.DataNode
Returns:
an instantiation action if the underlying data object is a template. Otherwise the abstract node's default action is returned, if null then the first action returned from getActions () method is used.

getNewTypes

public NewType[] getNewTypes()
Description copied from class: Node
Get the new types that can be created in this node. For example, a node representing a Java package will permit classes to be added.
Overrides:
getNewTypes in class AbstractNode
Following copied from class: org.openide.nodes.Node
Returns:
array of new type operations that are allowed

createPasteTypes

protected void createPasteTypes(Transferable t,
                                List s)
Description copied from class: AbstractNode
Accumulate the paste types that this node can handle for a given transferable.

The default implementation simply tests whether the transferable supports intelligent pasting via NodeTransfer.findPaste(java.awt.datatransfer.Transferable), and if so, it obtains the paste types from the transfer data and inserts them into the set.

Subclass implementations should typically call super (first or last) so that they add to, rather than replace, a superclass's available paste types; especially as the default implementation in AbstractNode is generally desirable to retain.

Overrides:
createPasteTypes in class AbstractNode
Following copied from class: org.openide.nodes.AbstractNode
Parameters:
t - a transferable containing clipboard data
s - a list of PasteTypes that will have added to it all types valid for this node (ordered as they will be presented to the user)


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