DataFolder.FolderNodepublic class DataNode
extends org.openide.nodes.AbstractNode
org.openide.nodes.Node.Cookie, org.openide.nodes.Node.Handle, org.openide.nodes.Node.IndexedProperty<T extends java.lang.Object,E extends java.lang.Object>, org.openide.nodes.Node.Property<T extends java.lang.Object>, org.openide.nodes.Node.PropertySet| Constructor | Description |
|---|---|
DataNode(DataObject obj,
org.openide.nodes.Children ch) |
Create a data node with the given children set for the given data object.
|
DataNode(DataObject obj,
org.openide.nodes.Children ch,
org.openide.util.Lookup lookup) |
Create a data node for a given data object.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
canCopy() |
|
boolean |
canCut() |
|
boolean |
canDestroy() |
Indicate whether the node may be destroyed.
|
boolean |
canRename() |
Indicate whether the node may be renamed.
|
java.awt.datatransfer.Transferable |
clipboardCopy() |
Copy this node to the clipboard.
|
java.awt.datatransfer.Transferable |
clipboardCut() |
Cut this node to the clipboard.
|
protected org.openide.util.actions.SystemAction[] |
createActions() |
Deprecated.
Use
getActions(boolean) or do nothing and let the
data loader specify actions. |
protected org.openide.nodes.Sheet |
createSheet() |
|
void |
destroy() |
Removes the node from its parent, deletes it and fires a property change.
|
org.openide.util.actions.SystemAction[] |
getActions() |
Deprecated.
Use getActions(boolean)
|
javax.swing.Action[] |
getActions(boolean context) |
Get actions for this data object.
|
<T extends org.openide.nodes.Node.Cookie> |
getCookie(java.lang.Class<T> cl) |
Get a cookie.
|
DataObject |
getDataObject() |
Get the represented data object.
|
java.lang.String |
getDisplayName() |
Get the display name for the node.
|
org.openide.nodes.Node.Handle |
getHandle() |
Handle for location of given data object.
|
org.openide.util.HelpCtx |
getHelpCtx() |
|
java.lang.String |
getHtmlDisplayName() |
Get a display name formatted using the limited HTML subset supported by
HtmlRenderer. |
java.awt.Image |
getIcon(int type) |
Get the displayed icon for this node.
|
java.awt.Image |
getOpenedIcon(int type) |
Get the displayed icon for this node.
|
javax.swing.Action |
getPreferredAction() |
Get default action.
|
static boolean |
getShowFileExtensions() |
Determine whether file extensions should be shown by default.
|
java.lang.Object |
getValue(java.lang.String attributeName) |
|
void |
setName(java.lang.String name) |
|
void |
setName(java.lang.String name,
boolean rename) |
Changes the name of the node and may also rename the data object.
|
static void |
setShowFileExtensions(boolean s) |
Set whether file extensions should be shown by default.
|
cloneNode, createPasteTypes, drag, getCookieSet, getCustomizer, getDefaultAction, getDropType, getNewTypes, getPasteTypes, getPropertySets, getSheet, hasCustomizer, setCookieSet, setDefaultAction, setIconBase, setIconBaseWithExtension, setSheetattributeNames, getName, getShortDescription, isExpert, isHidden, isPreferred, setExpert, setPreferred, setValueaddNodeListener, 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, toStringpublic DataNode(DataObject obj, org.openide.nodes.Children ch)
obj - object to work withch - children container for the nodegetShowFileExtensions()public DataNode(DataObject obj, org.openide.nodes.Children ch, org.openide.util.Lookup lookup)
obj - object to work withch - children container for the nodelookup - the lookup to provide content of Node.getLookup()
and also getCookie(java.lang.Class<T>)getShowFileExtensions()public DataObject getDataObject()
public void setName(java.lang.String name,
boolean rename)
name - new name for the objectrename - rename the data object?java.lang.IllegalArgumentException - if the rename failedpublic void setName(java.lang.String name)
setName in class org.openide.nodes.AbstractNodepublic java.lang.String getDisplayName()
specially alter this.
Subclassers overriding this method should consider the recommendations
in DataObject.createNodeDelegate().getDisplayName in class java.beans.FeatureDescriptorpublic java.lang.String getHtmlDisplayName()
HtmlRenderer. If the underlying
StatusDecorator supports HTML annotations, this method
will return non-null if status information is added.getHtmlDisplayName in class org.openide.nodes.NodeHtmlRenderer,
Node.getHtmlDisplayName()public java.awt.Image getIcon(int type)
specially alter this.
Subclassers overriding this method should consider the recommendations
in DataObject.createNodeDelegate().getIcon in class org.openide.nodes.AbstractNodetype - the icon type from BeanInfopublic java.awt.Image getOpenedIcon(int type)
specially alter this.
Subclassers overriding this method should consider the recommendations
in DataObject.createNodeDelegate().getOpenedIcon in class org.openide.nodes.AbstractNodetype - the icon type from BeanInfopublic org.openide.util.HelpCtx getHelpCtx()
getHelpCtx in class org.openide.nodes.AbstractNodepublic boolean canRename()
canRename in class org.openide.nodes.AbstractNodeDataObject.isRenameAllowed()public boolean canDestroy()
canDestroy in class org.openide.nodes.AbstractNodeDataObject.isDeleteAllowed()public void destroy()
throws java.io.IOException
destroy in class org.openide.nodes.Nodejava.io.IOExceptionpublic boolean canCopy()
canCopy in class org.openide.nodes.AbstractNodepublic boolean canCut()
canCut in class org.openide.nodes.AbstractNode@Deprecated protected org.openide.util.actions.SystemAction[] createActions()
getActions(boolean) or do nothing and let the
data loader specify actions.createActions in class org.openide.nodes.AbstractNodepublic javax.swing.Action[] getActions(boolean context)
getActions in class org.openide.nodes.NodenullDataLoader.getActions()@Deprecated public org.openide.util.actions.SystemAction[] getActions()
getActions in class org.openide.nodes.AbstractNodenullpublic javax.swing.Action getPreferredAction()
null is returned in case the underlying data
object is a template. The templates should not have any default
action.getPreferredAction in class org.openide.nodes.AbstractNodenull then
the first action returned from getActions (false) method is used.public <T extends org.openide.nodes.Node.Cookie> T getCookie(java.lang.Class<T> cl)
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.getCookie in class org.openide.nodes.AbstractNodenullprotected org.openide.nodes.Sheet createSheet()
createSheet in class org.openide.nodes.AbstractNodepublic java.lang.Object getValue(java.lang.String attributeName)
getValue in class java.beans.FeatureDescriptorpublic java.awt.datatransfer.Transferable clipboardCopy()
throws java.io.IOException
clipboardCopy in class org.openide.nodes.AbstractNodeExTransferable.Single with one copy flavorjava.io.IOException - if it could not copyNodeTransferpublic java.awt.datatransfer.Transferable clipboardCut()
throws java.io.IOException
clipboardCut in class org.openide.nodes.AbstractNodeExTransferable.Single with one cut flavorjava.io.IOException - if it could not cutNodeTransferpublic org.openide.nodes.Node.Handle getHandle()
getHandle in class org.openide.nodes.AbstractNodepublic static boolean getShowFileExtensions()
true if sopublic static void setShowFileExtensions(boolean s)
Note that this method affects all DataNodes.
s - true if soBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.