|
|||||||||||
| 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.Widget
com.google.gwt.user.client.ui.Tree
A standard hierarchical tree widget. The tree contains a hierarchy of
TreeItems that the user can
open, close, and select.
code
| Field Summary |
| Fields inherited from class java.lang.Object |
typeId, typeName |
| Constructor Summary | |
Tree()
Constructs an empty tree. |
|
| Method Summary | |
void |
addFocusListener(FocusListener listener)
|
TreeItem |
addItem(String itemText)
Adds a simple tree item containing the specified text. |
void |
addItem(TreeItem item)
Adds an item to the root level of this tree. |
void |
addKeyboardListener(KeyboardListener listener)
|
void |
addMouseListener(MouseListener listener)
|
void |
addTreeListener(TreeListener listener)
Adds a listener interface to receive tree events. |
void |
ensureSelectedItemVisible()
Ensures that the currently-selected item is visible, opening its parents and scrolling the tree as necessary. |
String |
getImageBase()
Gets this tree's default image package. |
TreeItem |
getItem(int index)
Gets the top-level tree item at the specified index. |
int |
getItemCount()
Gets the number of items contained at the root of this tree. |
TreeItem |
getSelectedItem()
Gets the currently selected item. |
int |
getTabIndex()
|
void |
onBrowserEvent(Event event)
Fired whenever a browser event is received. |
protected void |
onLoad()
This method is called when the widget becomes attached to the browser's document. |
void |
removeFocusListener(FocusListener listener)
|
void |
removeItem(TreeItem item)
Removes an item from the root level of this tree. |
void |
removeItems()
Removes all items from the root level of this tree. |
void |
removeKeyboardListener(KeyboardListener listener)
|
void |
removeTreeListener(TreeListener listener)
Removes a previously added listener interface. |
void |
setAccessKey(char key)
|
void |
setFocus(boolean focus)
|
void |
setImageBase(String baseUrl)
Sets the base URL under which this tree will find its default images. |
void |
setSelectedItem(TreeItem item)
Selects a specified item. |
void |
setSelectedItem(TreeItem item,
boolean fireEvents)
Selects a specified item. |
void |
setTabIndex(int index)
|
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
getParent, isAttached, onAttach, onDetach |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
equals, finalize, hashCode |
| Constructor Detail |
public Tree()
| Method Detail |
public void addFocusListener(FocusListener listener)
public TreeItem addItem(String itemText)
itemText - the text of the item to be added
public void addItem(TreeItem item)
item - the item to be addedpublic void addKeyboardListener(KeyboardListener listener)
public void addTreeListener(TreeListener listener)
SourcesTreeEvents
addTreeListener in interface SourcesTreeEventslistener - the listener interface to addpublic void ensureSelectedItemVisible()
public String getImageBase()
setImageBase(java.lang.String)public TreeItem getItem(int index)
index - the index to be retrieved
public int getItemCount()
public TreeItem getSelectedItem()
public int getTabIndex()
public void onBrowserEvent(Event event)
EventListener
onBrowserEvent in interface EventListeneronBrowserEvent in class Widgetpublic void removeFocusListener(FocusListener listener)
public void removeItem(TreeItem item)
item - the item to be removedpublic void removeItems()
public void removeKeyboardListener(KeyboardListener listener)
public void removeTreeListener(TreeListener listener)
SourcesTreeEvents
removeTreeListener in interface SourcesTreeEventslistener - the listener interface to removepublic void setAccessKey(char key)
public void setFocus(boolean focus)
public void setImageBase(String baseUrl)
public void setSelectedItem(TreeItem item)
item - the item to be selected, or null to unselect all
items
public void setSelectedItem(TreeItem item,
boolean fireEvents)
item - the item to be selected, or null to unselect all
itemsfireEvents - true to allow selection events to be firedpublic void setTabIndex(int index)
protected void onLoad()
Widget
onLoad in class Widgetpublic void addMouseListener(MouseListener listener)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||