|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.beans.FeatureDescriptor
|
+--org.openide.nodes.Node
|
+--org.openide.nodes.AbstractNode
|
+--org.openide.loaders.DataNode
Standard node representing a data object.
| 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 | |
DataNode(DataObject obj,
Children ch)
Create a data node for a given data object. |
|
| Method Summary | |
boolean |
canCopy()
Can this node be copied? |
boolean |
canCut()
Can this node be cut? |
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()
This method returns null to signal that actions provide by DataLoader.getActions should be returned from method getActions. |
protected Sheet |
createSheet()
Initialize a default property sheet; commonly overridden. |
void |
destroy()
Remove the node from its parent and deletes it. |
SystemAction[] |
getActions()
Get actions for this data object. |
Node.Cookie |
getCookie(Class cl)
Get a cookie. |
DataObject |
getDataObject()
Get the represented data object. |
SystemAction |
getDefaultAction()
Get default action. |
String |
getDisplayName()
Get the display name for the node. |
Node.Handle |
getHandle()
Handle for location of given data object. |
HelpCtx |
getHelpCtx()
Get context help associated with this node. |
Image |
getIcon(int type)
Get the displayed icon for this node. |
Image |
getOpenedIcon(int type)
Get the displayed icon for this node. |
static boolean |
getShowFileExtensions()
Should file extensions be shown by default? By default, no. |
void |
setName(String name)
Set the system 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, getDropType, getNewTypes, getPasteTypes, getPropertySets, getSheet, hasCustomizer, setCookieSet, setDefaultAction, setIconBase, 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 |
equals, 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()| 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)
AbstractNodeAbstractNode.displayFormat.setName in class AbstractNodeorg.openide.nodes.AbstractNodes - the new namepublic String getDisplayName()
specially alter this.getDisplayName in class FeatureDescriptorpublic Image getIcon(int type)
specially alter this.getIcon in class AbstractNodetype - the icon type from BeanInfopublic Image getOpenedIcon(int type)
specially alter this.getOpenedIcon in class AbstractNodetype - the icon type from BeanInfopublic HelpCtx getHelpCtx()
NodegetHelpCtx in class AbstractNodeorg.openide.nodes.Nodenull or HelpCtx.DEFAULT_HELP)public boolean canRename()
canRename in class AbstractNodeDataObject.isRenameAllowed()public boolean canDestroy()
canDestroy in class AbstractNodeDataObject.isDeleteAllowed()
public void destroy()
throws IOException
Nodechildren'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.
destroy in class Nodeorg.openide.nodes.NodeIOException - if something failspublic boolean canCopy()
AbstractNodecanCopy in class AbstractNodeorg.openide.nodes.AbstractNodetruepublic boolean canCut()
AbstractNodecanCut in class AbstractNodeorg.openide.nodes.AbstractNodefalseprotected SystemAction[] createActions()
createActions in class AbstractNodepublic SystemAction[] getActions()
getActions in class AbstractNodenullDataLoader.getActions()public SystemAction getDefaultAction()
default action if it represents a template.getDefaultAction in class AbstractNodenull then
the first action returned from getActions () 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.getCookie in class AbstractNodenullprotected Sheet createSheet()
AbstractNodeAbstractNode.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.
createSheet in class AbstractNodeorg.openide.nodes.AbstractNodenull)
public Transferable clipboardCopy()
throws IOException
clipboardCopy in class AbstractNodeExTransferable.Single with one copy flavorIOException - if it could not copyNodeTransfer
public Transferable clipboardCut()
throws IOException
clipboardCut in class AbstractNodeExTransferable.Single with one cut flavorIOException - 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||