|
org.openide.src 1.8.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.beans.FeatureDescriptor org.openide.nodes.Node org.openide.nodes.AbstractNode org.openide.src.nodes.ElementNode
public abstract class ElementNode
Superclass of nodes representing elements in the source hierarchy.
Element nodes generally:
resolveIconBase()
.
elementFormat
;
changes to relevant
element properties
automatically affect the display name.
Nested Class Summary |
---|
Nested classes/interfaces 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_LEAF, PROP_NAME, PROP_OPENED_ICON, PROP_PARENT_NODE, PROP_PROPERTY_SETS, PROP_SHORT_DESCRIPTION |
Fields inherited from interface org.openide.src.ElementProperties |
---|
PROP_ALL_CLASSES, PROP_BODY, PROP_CLASS_OR_INTERFACE, PROP_CLASSES, PROP_CONSTRUCTORS, PROP_EXCEPTIONS, PROP_FIELDS, PROP_IMPORTS, PROP_INIT_VALUE, PROP_INITIALIZERS, PROP_INTERFACES, PROP_JAVADOC, PROP_MEMBERS, PROP_METHODS, PROP_MODIFIERS, PROP_NAME, PROP_PACKAGE, PROP_PARAMETERS, PROP_RETURN, PROP_STATIC, PROP_STATUS, PROP_SUPERCLASS, PROP_TYPE, PROP_VALID |
Constructor Summary | |
---|---|
ElementNode(Element element,
Children children,
boolean writeable)
Create a new element node. |
Method Summary | |
---|---|
boolean |
canCopy()
Test whether this node can be copied. |
boolean |
canCut()
Test whether this node can be cut. |
boolean |
canDestroy()
Test whether this node can be deleted. |
boolean |
canRename()
Test whether this node can be renamed. |
Transferable |
clipboardCopy()
|
Transferable |
clipboardCut()
|
boolean |
equals(Object o)
Test for equality. |
Node.Cookie |
getCookie(Class type)
Get a cookie from this node. |
ElementFormat |
getElementFormat()
Get a format for the element's display name. |
Node.Handle |
getHandle()
Get a handle. |
HelpCtx |
getHelpCtx()
|
protected abstract ElementFormat |
getHintElementFormat()
Get a format for creating this node's short description . |
protected String[] |
getIconAffectingProperties()
Get the names of all element properties which might affect the choice of icon. |
Node.PropertySet[] |
getPropertySets()
|
String |
getShortDescription()
|
int |
hashCode()
Get a hash code. |
protected abstract String |
resolveIconBase()
Get the currently appropriate icon base. |
void |
setActions(SystemAction[] actions)
Set all actions for this node. |
void |
setElementFormat(ElementFormat elementFormat)
Set the format for the display name. |
Methods inherited from class org.openide.nodes.AbstractNode |
---|
cloneNode, createActions, createPasteTypes, createSheet, drag, getActions, getCookieSet, getCustomizer, getDefaultAction, getDropType, getIcon, getNewTypes, getOpenedIcon, getPasteTypes, getPreferredAction, getSheet, hasCustomizer, setCookieSet, setDefaultAction, setIconBase, setIconBaseWithExtension, setName, setSheet |
Methods inherited from class java.beans.FeatureDescriptor |
---|
attributeNames, getDisplayName, getName, getValue, isExpert, isHidden, isPreferred, setExpert, setHidden, setPreferred, setValue |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final SourceOptions sourceOptions
protected Element element
protected ElementFormat elementFormat
FeatureDescriptor.getDisplayName()
.
protected boolean writeable
public static final String FIELD_PUBLIC
public static final String FIELD_PROTECTED
public static final String FIELD_PRIVATE
public static final String FIELD_PACKAGE
public static final String FIELD_ST_PUBLIC
public static final String FIELD_ST_PROTECTED
public static final String FIELD_ST_PRIVATE
public static final String FIELD_ST_PACKAGE
public static final String CONSTRUCTOR_PUBLIC
public static final String CONSTRUCTOR_PROTECTED
public static final String CONSTRUCTOR_PRIVATE
public static final String CONSTRUCTOR_PACKAGE
public static final String METHOD_PUBLIC
public static final String METHOD_PROTECTED
public static final String METHOD_PRIVATE
public static final String METHOD_PACKAGE
public static final String METHOD_ST_PUBLIC
public static final String METHOD_ST_PROTECTED
public static final String METHOD_ST_PRIVATE
public static final String METHOD_ST_PACKAGE
public static final String INITIALIZER
public static final String INITIALIZER_ST
public static final String CLASS
public static final String INTERFACE
public static final String WAIT
public static final String ERROR
public static final String FIELDS_CATEGORY
public static final String CONSTRUCTORS_CATEGORY
public static final String METHODS_CATEGORY
Constructor Detail |
---|
public ElementNode(Element element, Children children, boolean writeable)
element
- element to representchildren
- child nodeswriteable
- true
if this node should allow modifications.
These include writable properties, clipboard operations, deletions, etc.Method Detail |
---|
public String getShortDescription()
getShortDescription
in class FeatureDescriptor
protected abstract String resolveIconBase()
relevant
change is made to the element.
AbstractNode.setIconBase(java.lang.String)
protected String[] getIconAffectingProperties()
ElementProperties.PROP_MODIFIERS
.
ElementProperties
public final ElementFormat getElementFormat()
relevant
change is made to the element.
public final void setElementFormat(ElementFormat elementFormat)
elementFormat
- the new format
IllegalArgumentException
- if the format object is inappropriate
for this type of Element. No assignment is made in such case.protected abstract ElementFormat getHintElementFormat()
short description
.
public HelpCtx getHelpCtx()
getHelpCtx
in interface HelpCtx.Provider
getHelpCtx
in class AbstractNode
public boolean canRename()
writeable
.
canRename
in class AbstractNode
true
if this node can be renamedpublic boolean canDestroy()
writeable
.
canDestroy
in class AbstractNode
true
if this node can be renamedpublic Transferable clipboardCopy() throws IOException
clipboardCopy
in class AbstractNode
IOException
public Transferable clipboardCut() throws IOException
clipboardCut
in class AbstractNode
IOException
public boolean canCopy()
true
.
canCopy
in class AbstractNode
true
if it canpublic boolean canCut()
writeable
.
canCut
in class AbstractNode
true
if it canpublic void setActions(SystemAction[] actions)
actions
- new list of actionspublic Node.Cookie getCookie(Class type)
Element.getCookie(java.lang.Class)
.
Since Element
implements Node.Cookie
, it is
possible to find the element from a node using code such as:
Node someNode = ...;
MethodElement element = (MethodElement) someNode.getCookie (MethodElement.class);
if (element != null) { ... }
getCookie
in class AbstractNode
type
- the cookie class
null
public boolean equals(Object o)
true
if the represented Element
s are equalpublic int hashCode()
Element
public Node.Handle getHandle()
getHandle
in class AbstractNode
public Node.PropertySet[] getPropertySets()
getPropertySets
in class AbstractNode
|
org.openide.src 1.8.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |