|
|||||||||||
| 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
Standard node representing a data object.
| Nested Class Summary |
| Nested classes 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 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()
This method returns null to signal that actions provide by DataLoader.getActions should be returned from method getActions. |
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, 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()| 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)
public String getDisplayName()
specially alter this.
Subclassers overriding this method should consider the recommendations
in DataObject.createNodeDelegate().
public String getHtmlDisplayName()
HtmlRenderer. If the underlying
FileSystem.Status is an instance of HmlStatus,
this method will return non-null if status information is added.
HtmlRenderer,
Node.getHtmlDisplayName()public Image getIcon(int type)
specially alter this.
Subclassers overriding this method should consider the recommendations
in DataObject.createNodeDelegate().
type - the icon type from BeanInfo
public Image getOpenedIcon(int type)
specially alter this.
Subclassers overriding this method should consider the recommendations
in DataObject.createNodeDelegate().
type - the icon type from BeanInfo
public HelpCtx getHelpCtx()
public boolean canRename()
DataObject.isRenameAllowed()public boolean canDestroy()
DataObject.isDeleteAllowed()
public void destroy()
throws IOException
IOExceptionpublic boolean canCopy()
public boolean canCut()
protected SystemAction[] createActions()
public Action[] getActions(boolean context)
nullDataLoader.getActions()public SystemAction[] getActions()
nullpublic Action getPreferredAction()
null is returned in case the underlying data
object is a template. The templates should not have any default
action.
null 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().
nullprotected Sheet createSheet()
public Transferable clipboardCopy() throws IOException
ExTransferable.Single with one copy flavor
IOException - if it could not copyNodeTransferpublic Transferable clipboardCut() throws IOException
ExTransferable.Single with one cut flavor
IOException - if it could not cutNodeTransferpublic Node.Handle getHandle()
public static boolean getShowFileExtensions()
true if sopublic static void setShowFileExtensions(boolean s)
s - true if so
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||