public class DataFolder.FolderNode extends DataNode
Node.Cookie, Node.Handle, Node.IndexedProperty<T,E>, Node.Property<T>, Node.PropertySet
displayFormat, systemActions
EMPTY, PROP_COOKIE, PROP_DISPLAY_NAME, PROP_ICON, PROP_LEAF, PROP_NAME, PROP_OPENED_ICON, PROP_PARENT_NODE, PROP_PROPERTY_SETS, PROP_SHORT_DESCRIPTION
Modifier | Constructor and Description |
---|---|
protected |
FolderNode()
Create a folder node with default folder children.
|
|
FolderNode(Children ch)
Create a folder node with some children.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createPasteTypes(Transferable t,
List<PasteType> s) |
protected Sheet |
createSheet() |
<T extends Node.Cookie> |
getCookie(Class<T> clazz)
Get a cookie.
|
Image |
getIcon(int type)
Overrides folder icon to search for icon in UIManager table for
BeanInfo.ICON_COLOR_16x16 type, to allow for different icons
across Look and Feels.
|
NewType[] |
getNewTypes() |
Image |
getOpenedIcon(int type)
Overrides folder icon to search for icon in UIManager table for
BeanInfo.ICON_COLOR_16x16 type, to allow for different icons
across Look and Feels.
|
Action |
getPreferredAction()
Get default action.
|
void |
setName(String name) |
canCopy, canCut, canDestroy, canRename, clipboardCopy, clipboardCut, createActions, destroy, getActions, getActions, getDataObject, getDisplayName, getHandle, getHelpCtx, getHtmlDisplayName, getShowFileExtensions, getValue, setName, setShowFileExtensions
cloneNode, drag, getCookieSet, getCustomizer, getDefaultAction, getDropType, getPasteTypes, getPropertySets, getSheet, hasCustomizer, setCookieSet, setDefaultAction, setIconBase, setIconBaseWithExtension, setSheet
addNodeListener, addPropertyChangeListener, clone, equals, fireCookieChange, fireDisplayNameChange, fireIconChange, fireNameChange, fireNodeDestroyed, fireOpenedIconChange, firePropertyChange, firePropertySetsChange, fireShortDescriptionChange, getChildren, getContextActions, getContextMenu, getLookup, getParentNode, hashCode, hasPropertyChangeListener, isLeaf, removeNodeListener, removePropertyChangeListener, setChildren, setDisplayName, setHidden, setShortDescription, toString
attributeNames, getName, getShortDescription, isExpert, isHidden, isPreferred, setExpert, setPreferred, setValue
public FolderNode(Children ch)
ch
- children to use for the nodeprotected FolderNode()
public Image getIcon(int type)
public Image getOpenedIcon(int type)
getOpenedIcon
in class DataNode
type
- the icon type from BeanInfo
public <T extends Node.Cookie> T getCookie(Class<T> clazz)
DataNode
DataObject.getCookie(java.lang.Class<T>)
is
called. If it produces non-null
result, that is returned.
Otherwise the superclass is tried.
Subclassers overriding this method should consider the recommendations
in DataObject.createNodeDelegate()
. Since version 5.6, if
non-null Lookup
is passed to the constructor, then this
method directly delegates to super.getCookie and does
not query data object at all. This is supposed to provide consistency
between results in getLookup().lookup
and getCookie
.protected Sheet createSheet()
createSheet
in class DataNode
public Action getPreferredAction()
DataNode
null
is returned in case the underlying data
object is a template. The templates should not have any default
action.getPreferredAction
in class DataNode
null
then
the first action returned from getActions (false) method is used.public NewType[] getNewTypes()
getNewTypes
in class AbstractNode
protected void createPasteTypes(Transferable t, List<PasteType> s)
createPasteTypes
in class DataNode