|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.TreeItem
org.cafesip.gwtcomp.client.ui.SuperTreeItem
public class SuperTreeItem
This class extends the GWT TreeItem class and is used for specifying the object type
required for the SuperTree's context-menu feature.
In addition, it also allows applications to specify a popup menu specific to this tree item.
If the application requires to override the level-specific context menu for this tree item,
it can use the setContextMenu() method to specify a different context menu.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.TreeItem |
|---|
com.google.gwt.user.client.ui.TreeItem.TreeItemImpl, com.google.gwt.user.client.ui.TreeItem.TreeItemImplIE6 |
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
SuperTreeItem(int type)
A constructor for this class. |
|
SuperTreeItem(java.lang.String html,
int type)
A constructor for this class. |
|
SuperTreeItem(com.google.gwt.user.client.ui.Widget widget,
int type)
A constructor for this class. |
|
| Method Summary | |
|---|---|
com.google.gwt.user.client.ui.TreeItem |
addItem(java.lang.String itemText)
|
void |
addItem(SuperTreeItem item)
Add a SuperTree object as a child of this tree element. |
void |
addItem(com.google.gwt.user.client.ui.TreeItem item)
|
com.google.gwt.user.client.ui.TreeItem |
addItem(com.google.gwt.user.client.ui.Widget widget)
|
PopupMenu |
getContextMenu()
Gets the context menu for this element. |
int |
getType()
Returns the type of the object. |
java.lang.Object |
getUserObject()
|
void |
setContextMenu(PopupMenu contextMenu)
Sets an item-specific context menu. |
void |
setHTML(java.lang.String html)
|
void |
setText(java.lang.String text)
|
void |
setType(int type)
Sets the type of this object. |
void |
setUserObject(java.lang.Object userObject)
|
void |
setWidget(com.google.gwt.user.client.ui.Widget newWidget)
|
| Methods inherited from class com.google.gwt.user.client.ui.TreeItem |
|---|
getChild, getChildCount, getChildIndex, getFocusableWidget, getHTML, getParentItem, getState, getText, getTree, getWidget, isSelected, onEnsureDebugId, remove, removeItem, removeItems, setSelected, setState, setState |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SuperTreeItem(int type)
type - type of the object. The object type must be greater than zero as zero is
a reserved type.
public SuperTreeItem(java.lang.String html,
int type)
html - tree item rendition using HTML.type - type of the object. The object type must be greater than zero as zero is
a reserved type.
public SuperTreeItem(com.google.gwt.user.client.ui.Widget widget,
int type)
widget - widget rendition of the tree item.type - type of the object. The object type must be greater than zero as zero is
a reserved type.| Method Detail |
|---|
public com.google.gwt.user.client.ui.TreeItem addItem(java.lang.String itemText)
addItem in class com.google.gwt.user.client.ui.TreeItem
Note that all the items in the tree are converted to GWT HTML object
before adding to the tree. Therefore, the GWT Tree.getText() method
will return a null.
public void addItem(SuperTreeItem item)
item - item to add.public void addItem(com.google.gwt.user.client.ui.TreeItem item)
addItem in class com.google.gwt.user.client.ui.TreeItemTreeItem.addItem(com.google.gwt.user.client.ui.TreeItem)public com.google.gwt.user.client.ui.TreeItem addItem(com.google.gwt.user.client.ui.Widget widget)
addItem in class com.google.gwt.user.client.ui.TreeItemTreeItem.addItem(com.google.gwt.user.client.ui.Widget)public PopupMenu getContextMenu()
public int getType()
public java.lang.Object getUserObject()
getUserObject in class com.google.gwt.user.client.ui.TreeItemTreeItem.getUserObject()public void setContextMenu(PopupMenu contextMenu)
contextMenu - The contextMenu to set.public void setHTML(java.lang.String html)
setHTML in interface com.google.gwt.user.client.ui.HasHTMLsetHTML in class com.google.gwt.user.client.ui.TreeItem
Note that all the items in the tree are converted to GWT HTML object
before adding to the tree. Therefore, the GWT Tree.getHTML() method
will return a null.
public void setText(java.lang.String text)
setText in interface com.google.gwt.user.client.ui.HasTextsetText in class com.google.gwt.user.client.ui.TreeItem
Note that all the items in the tree are converted to GWT HTML object
before adding to the tree. Therefore, the GWT Tree.getText() method
will return a null.
public void setType(int type)
type - The type to set.public void setUserObject(java.lang.Object userObject)
setUserObject in class com.google.gwt.user.client.ui.TreeItemTreeItem.setUserObject(java.lang.Object)public void setWidget(com.google.gwt.user.client.ui.Widget newWidget)
setWidget in class com.google.gwt.user.client.ui.TreeItemTreeItem.setWidget(com.google.gwt.user.client.ui.Widget)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||