|
RSE Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.ui.dialogs.SystemSimpleContentElement
public class SystemSimpleContentElement
When we populate a TreeViewer in a dialog, we need a simple representation of the objects to populate the tree.
Works in concert with SystemSimpleContentProvider
SystemSimpleContentElement
,
SystemSimpleSelectDialog
Constructor Summary | |
---|---|
SystemSimpleContentElement(String name,
Object data,
SystemSimpleContentElement parent,
SystemSimpleContentElement[] children)
Constructor when given children as an array. |
|
SystemSimpleContentElement(String name,
Object data,
SystemSimpleContentElement parent,
Vector children)
Constructor when given children as a vector. |
Method Summary | |
---|---|
void |
addChild(SystemSimpleContentElement child,
int pos)
Add the given child element at the given zero-based position |
void |
deleteChild(SystemSimpleContentElement child)
Delete the given child element. |
SystemSimpleContentElement[] |
getChildren()
Return the child elements, or null if no children |
Object |
getData()
Return the real object which this element wraps or represents |
static SystemSimpleContentElement |
getDataElement(SystemSimpleContentElement root,
Object data)
Find element corresponding to given data |
ImageDescriptor |
getImageDescriptor()
Get the image to display for this element, in the tree viewer |
String |
getName()
Return the display name for this element |
SystemSimpleContentElement |
getParent()
Get the parent element |
SystemSimpleContentElement |
getRoot()
Walk up the parent tree until we find the root |
boolean |
hasChildren()
Return true if this element has children |
boolean |
isDeletable()
Return true if this item is deletable. |
boolean |
isReadOnly()
Return whether this node is readonly or not. |
boolean |
isRenamable()
Return true if this item is renamable or not. |
boolean |
isSelected()
Return true if this element has been flagged as selected. |
void |
setChildren(SystemSimpleContentElement[] children)
Set the child elements of this element, as an array of SystemSimpleContentElement elements |
void |
setChildren(Vector childrenVector)
Set the child elements of this element, as a vector of SystemSimpleContentElement elements |
void |
setData(Object data)
Set the real object which this element wraps or represents |
void |
setDeletable(boolean deletable)
Set whether this item is deletable or not. |
void |
setImageDescriptor(ImageDescriptor imageDescriptor)
Set the image to display for this element, in the tree viewer |
void |
setName(String name)
Set the display name for this element |
void |
setParent(SystemSimpleContentElement parent)
Set the parent element |
void |
setReadOnly(boolean readonly)
Set whether this node is readonly or not. |
void |
setRenamable(boolean renamable)
Set whether this item is renamable or not. |
void |
setSelected(boolean selected)
Set selected state. |
String |
toString()
Maps to getName() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SystemSimpleContentElement(String name, Object data, SystemSimpleContentElement parent, SystemSimpleContentElement[] children)
name
- - the display name to show for this elementdata
- - the real object which is to be contained by this elementparent
- - the parent element of this element. Pass null for the root.children
- - an array of SystemSimpleContentElement objects that are to be the children of this element. Can be null.public SystemSimpleContentElement(String name, Object data, SystemSimpleContentElement parent, Vector children)
name
- - the display name to show for this elementdata
- - the real object which is to be contained by this elementparent
- - the parent element of this element. Pass null for the root.children
- - a vector of SystemSimpleContentElement objects that are to be the children of this element. Can be null.Method Detail |
---|
public String getName()
public void setName(String name)
public Object getData()
public void setData(Object data)
public SystemSimpleContentElement getParent()
public void setParent(SystemSimpleContentElement parent)
public SystemSimpleContentElement getRoot()
public SystemSimpleContentElement[] getChildren()
public boolean hasChildren()
public void setChildren(SystemSimpleContentElement[] children)
public void setChildren(Vector childrenVector)
public void setSelected(boolean selected)
public boolean isSelected()
public void setRenamable(boolean renamable)
public boolean isRenamable()
public void setDeletable(boolean deletable)
public boolean isDeletable()
public void setReadOnly(boolean readonly)
public boolean isReadOnly()
public void setImageDescriptor(ImageDescriptor imageDescriptor)
public ImageDescriptor getImageDescriptor()
public void deleteChild(SystemSimpleContentElement child)
public void addChild(SystemSimpleContentElement child, int pos)
public String toString()
toString
in class Object
public static SystemSimpleContentElement getDataElement(SystemSimpleContentElement root, Object data)
|
RSE Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |