Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.ui.dialogs
Class SystemSimpleContentElement

java.lang.Object
  extended by 
org.eclipse.rse.ui.dialogs.SystemSimpleContentElement

public class SystemSimpleContentElement
extends Object

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

See Also:
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

SystemSimpleContentElement

public SystemSimpleContentElement(
String name,
                                  
Object data,
                                  
SystemSimpleContentElement parent,
                                  
SystemSimpleContentElement[] children)
Constructor when given children as an array.

Parameters:
name - - the display name to show for this element
data - - the real object which is to be contained by this element
parent - - 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.

SystemSimpleContentElement

public SystemSimpleContentElement(
String name,
                                  
Object data,
                                  
SystemSimpleContentElement parent,
                                  
Vector children)
Constructor when given children as a vector.

Parameters:
name - - the display name to show for this element
data - - the real object which is to be contained by this element
parent - - 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

getName

public 
String getName()
Return the display name for this element


setName

public void setName(
String name)
Set the display name for this element


getData

public 
Object getData()
Return the real object which this element wraps or represents


setData

public void setData(
Object data)
Set the real object which this element wraps or represents


getParent

public 
SystemSimpleContentElement getParent()
Get the parent element


setParent

public void setParent(
SystemSimpleContentElement parent)
Set the parent element


getRoot

public 
SystemSimpleContentElement getRoot()
Walk up the parent tree until we find the root


getChildren

public 
SystemSimpleContentElement[] getChildren()
Return the child elements, or null if no children


hasChildren

public boolean hasChildren()
Return true if this element has children


setChildren

public void setChildren(
SystemSimpleContentElement[] children)
Set the child elements of this element, as an array of SystemSimpleContentElement elements


setChildren

public void setChildren(
Vector childrenVector)
Set the child elements of this element, as a vector of SystemSimpleContentElement elements


setSelected

public void setSelected(boolean selected)
Set selected state. Used in SimpleSimpleSelectDialog to pre-check item in CheckboxTreeViewer


isSelected

public boolean isSelected()
Return true if this element has been flagged as selected.


setRenamable

public void setRenamable(boolean renamable)
Set whether this item is renamable or not. Default is true. Used to enable/disable rename action.


isRenamable

public boolean isRenamable()
Return true if this item is renamable or not. Default is true.


setDeletable

public void setDeletable(boolean deletable)
Set whether this item is deletable or not. Default is true. Used to enable/disable rename action.


isDeletable

public boolean isDeletable()
Return true if this item is deletable. Will be true unless setDeletable(false) has been called.


setReadOnly

public void setReadOnly(boolean readonly)
Set whether this node is readonly or not. If readonly, users cannot change its selected state.


isReadOnly

public boolean isReadOnly()
Return whether this node is readonly or not. Readonly nodes cannot be selected/deselected by the user.


setImageDescriptor

public void setImageDescriptor(
ImageDescriptor imageDescriptor)
Set the image to display for this element, in the tree viewer


getImageDescriptor

public 
ImageDescriptor getImageDescriptor()
Get the image to display for this element, in the tree viewer


deleteChild

public void deleteChild(
SystemSimpleContentElement child)
Delete the given child element.


addChild

public void addChild(
SystemSimpleContentElement child,
                     int pos)
Add the given child element at the given zero-based position


toString

public 
String toString()
Maps to getName()

Overrides:
toString in class Object

getDataElement

public static 
SystemSimpleContentElement getDataElement(
SystemSimpleContentElement root,
                                                        
Object data)
Find element corresponding to given data


RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire