|
org.openide.loaders 5.9.31 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.beans.FeatureDescriptor
org.openide.nodes.Node
org.openide.nodes.AbstractNode
org.openide.loaders.DataNode
public class DataNode
Standard node representing a data object.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.openide.nodes.Node |
|---|
Node.Cookie, Node.Handle, Node.IndexedProperty, Node.Property, Node.PropertySet |
| Field Summary |
|---|
| 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_LEAF, PROP_NAME, PROP_OPENED_ICON, PROP_PARENT_NODE, PROP_PROPERTY_SETS, PROP_SHORT_DESCRIPTION |
| Constructor Summary | |
|---|---|
DataNode(DataObject obj,
Children ch)
Create a data node with the given children set for the given data object. |
|
DataNode(DataObject obj,
Children ch,
Lookup lookup)
Create a data node for a given data object. |
|
| Method Summary | |
|---|---|
boolean |
canCopy()
|
boolean |
canCut()
|
boolean |
canDestroy()
Indicate whether the node may be destroyed. |
boolean |
canRename()
Indicate whether the node may be renamed. |
Transferable |
clipboardCopy()
Copy this node to the clipboard. |
Transferable |
clipboardCut()
Cut this node to the clipboard. |
protected SystemAction[] |
createActions()
Deprecated. Use getActions(boolean) or do nothing and let the
data loader specify actions. |
protected Sheet |
createSheet()
|
void |
destroy()
|
SystemAction[] |
getActions()
Deprecated. Use getActions(boolean) |
Action[] |
getActions(boolean context)
Get actions for this data object. |
Node.Cookie |
getCookie(Class cl)
Get a cookie. |
DataObject |
getDataObject()
Get the represented data object. |
String |
getDisplayName()
Get the display name for the node. |
Node.Handle |
getHandle()
Handle for location of given data object. |
HelpCtx |
getHelpCtx()
|
String |
getHtmlDisplayName()
Get a display name formatted using the limited HTML subset supported by HtmlRenderer. |
Image |
getIcon(int type)
Get the displayed icon for this node. |
Image |
getOpenedIcon(int type)
Get the displayed icon for this node. |
Action |
getPreferredAction()
Get default action. |
static boolean |
getShowFileExtensions()
Determine whether file extensions should be shown by default. |
void |
setName(String name)
|
void |
setName(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. |
| Methods inherited from class org.openide.nodes.AbstractNode |
|---|
cloneNode, createPasteTypes, drag, getCookieSet, getCustomizer, getDefaultAction, getDropType, getNewTypes, getPasteTypes, getPropertySets, getSheet, hasCustomizer, setCookieSet, setDefaultAction, setIconBase, setIconBaseWithExtension, setSheet |
| 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 |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataNode(DataObject obj, Children ch)
obj - object to work withch - children container for the nodegetShowFileExtensions()public DataNode(DataObject obj, Children ch, 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)getShowFileExtensions()| Method Detail |
|---|
public DataObject getDataObject()
public void setName(String name, boolean rename)
name - new name for the objectrename - rename the data object?
IllegalArgumentException - if the rename failedpublic void setName(String name)
setName in class AbstractNodepublic String getDisplayName()
specially alter this.
Subclassers overriding this method should consider the recommendations
in DataObject.createNodeDelegate().
getDisplayName in class FeatureDescriptorpublic String getHtmlDisplayName()
HtmlRenderer. If the underlying
FileSystem.Status is an instance of HmlStatus,
this method will return non-null if status information is added.
getHtmlDisplayName in class NodeHtmlRenderer,
Node.getHtmlDisplayName()public Image getIcon(int type)
specially alter this.
Subclassers overriding this method should consider the recommendations
in DataObject.createNodeDelegate().
getIcon in class AbstractNodetype - the icon type from BeanInfo
public Image getOpenedIcon(int type)
specially alter this.
Subclassers overriding this method should consider the recommendations
in DataObject.createNodeDelegate().
getOpenedIcon in class AbstractNodetype - the icon type from BeanInfo
public HelpCtx getHelpCtx()
getHelpCtx in interface HelpCtx.ProvidergetHelpCtx in class AbstractNodepublic boolean canRename()
canRename in class AbstractNodeDataObject.isRenameAllowed()public boolean canDestroy()
canDestroy in class AbstractNodeDataObject.isDeleteAllowed()
public void destroy()
throws IOException
IOExceptionpublic boolean canCopy()
canCopy in class AbstractNodepublic boolean canCut()
canCut in class AbstractNodeprotected SystemAction[] createActions()
getActions(boolean) or do nothing and let the
data loader specify actions.
createActions in class AbstractNodepublic Action[] getActions(boolean context)
getActions in class NodenullDataLoader.getActions()public SystemAction[] getActions()
getActions in class AbstractNodenullpublic 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 AbstractNodenull then
the first action returned from getActions (false) method is used.public Node.Cookie getCookie(Class cl)
DataObject.getCookie(java.lang.Class) 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 AbstractNodenullprotected Sheet createSheet()
createSheet in class AbstractNodepublic Transferable clipboardCopy() throws IOException
clipboardCopy in class AbstractNodeExTransferable.Single with one copy flavor
IOException - if it could not copyNodeTransferpublic Transferable clipboardCut() throws IOException
clipboardCut in class AbstractNodeExTransferable.Single with one cut flavor
IOException - if it could not cutNodeTransferpublic Node.Handle getHandle()
getHandle in class AbstractNodepublic static boolean getShowFileExtensions()
true if sopublic static void setShowFileExtensions(boolean s)
s - true if so
|
org.openide.loaders 5.9.31 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||