|
||||||||||
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.Panel
com.google.gwt.widgetideas.client.FastTree
public class FastTree
A standard hierarchical tree widget. The tree contains a hierarchy of
FastTreeItem
s.
Nested Class Summary | |
---|---|
static interface |
FastTree.DefaultResources
Resources used. |
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 | |
---|---|
FastTree()
Constructs a tree. |
Method Summary | |
---|---|
void |
add(com.google.gwt.user.client.ui.Widget widget)
Adds the widget as a root tree item. |
static void |
addDefaultCSS()
Add the default style sheet and images. |
void |
addFocusListener(com.google.gwt.user.client.ui.FocusListener listener)
|
void |
addItem(FastTreeItem item)
Adds an item to the root level of this tree. |
FastTreeItem |
addItem(java.lang.String itemText)
Adds a simple tree item containing the specified text. |
FastTreeItem |
addItem(com.google.gwt.user.client.ui.Widget widget)
Adds a new tree item containing the specified widget. |
void |
addKeyboardListener(com.google.gwt.user.client.ui.KeyboardListener listener)
|
void |
addMouseListener(com.google.gwt.user.client.ui.MouseListener listener)
|
void |
clear()
Clears all tree items from the current tree. |
protected void |
doAttachChildren()
|
protected void |
doDetachChildren()
|
void |
ensureSelectedItemVisible()
Ensures that the currently-selected item is visible, opening its parents and scrolling the tree as necessary. |
FastTreeItem |
getChild(int index)
Gets the child at the specified index. |
int |
getChildCount()
Gets the number of children contained in this item. |
int |
getChildIndex(FastTreeItem child)
Gets the index of the specified child item. |
FastTreeItem |
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. |
protected FastTreeItem |
getRoot()
|
FastTreeItem |
getSelectedItem()
Gets the currently selected item. |
int |
getTabIndex()
|
java.util.Iterator |
iterator()
|
protected void |
moveSelectionBar(FastTreeItem item)
Moves the selection bar around the given FastTreeItem . |
void |
onBrowserEvent(com.google.gwt.user.client.Event event)
|
protected void |
onLoad()
|
protected void |
onSelection(FastTreeItem item,
boolean fireEvents,
boolean moveFocus)
|
protected void |
onUnload()
This method is called immediately before a widget will be detached from the browser's document. |
boolean |
remove(com.google.gwt.user.client.ui.Widget w)
|
void |
removeFocusListener(com.google.gwt.user.client.ui.FocusListener listener)
|
void |
removeItem(FastTreeItem 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(com.google.gwt.user.client.ui.KeyboardListener listener)
|
void |
setAccessKey(char key)
|
void |
setFocus(boolean focus)
|
void |
setSelectedItem(FastTreeItem item)
Selects a specified item. |
void |
setSelectedItem(FastTreeItem item,
boolean fireEvents)
Selects a specified item. |
void |
setTabIndex(int index)
|
java.util.Iterator |
treeItemIterator()
Iterator of tree items. |
Methods inherited from class com.google.gwt.user.client.ui.Panel |
---|
adopt, adopt, disown, orphan |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
getParent, isAttached, onAttach, onDetach, removeFromParent, setElement |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, 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 FastTree()
Method Detail |
---|
public static void addDefaultCSS()
public void add(com.google.gwt.user.client.ui.Widget widget)
add
in interface com.google.gwt.user.client.ui.HasWidgets
add
in class com.google.gwt.user.client.ui.Panel
widget
- widget to add.HasWidgets.add(com.google.gwt.user.client.ui.Widget)
public void addFocusListener(com.google.gwt.user.client.ui.FocusListener listener)
addFocusListener
in interface com.google.gwt.user.client.ui.SourcesFocusEvents
public void addItem(FastTreeItem item)
addItem
in interface HasFastTreeItems
item
- the item to be addedpublic FastTreeItem addItem(java.lang.String itemText)
addItem
in interface HasFastTreeItems
itemText
- the text of the item to be added
public FastTreeItem addItem(com.google.gwt.user.client.ui.Widget widget)
addItem
in interface HasFastTreeItems
widget
- the widget to be added
public void addKeyboardListener(com.google.gwt.user.client.ui.KeyboardListener listener)
addKeyboardListener
in interface com.google.gwt.user.client.ui.SourcesKeyboardEvents
public void addMouseListener(com.google.gwt.user.client.ui.MouseListener listener)
public void clear()
clear
in interface com.google.gwt.user.client.ui.HasWidgets
clear
in class com.google.gwt.user.client.ui.Panel
public void ensureSelectedItemVisible()
public FastTreeItem getChild(int index)
HasFastTreeItems
getChild
in interface HasFastTreeItems
index
- the index to be retrieved
public int getChildCount()
HasFastTreeItems
getChildCount
in interface HasFastTreeItems
public int getChildIndex(FastTreeItem child)
HasFastTreeItems
getChildIndex
in interface HasFastTreeItems
child
- the child item to be found
-1
if none is foundpublic FastTreeItem getItem(int index)
index
- the index to be retrieved
public int getItemCount()
public FastTreeItem getSelectedItem()
public int getTabIndex()
getTabIndex
in interface com.google.gwt.user.client.ui.HasFocus
public java.util.Iterator iterator()
iterator
in interface com.google.gwt.user.client.ui.HasWidgets
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent
in interface com.google.gwt.user.client.EventListener
onBrowserEvent
in class com.google.gwt.user.client.ui.Widget
public boolean remove(com.google.gwt.user.client.ui.Widget w)
remove
in interface com.google.gwt.user.client.ui.HasWidgets
remove
in class com.google.gwt.user.client.ui.Panel
public void removeFocusListener(com.google.gwt.user.client.ui.FocusListener listener)
removeFocusListener
in interface com.google.gwt.user.client.ui.SourcesFocusEvents
public void removeItem(FastTreeItem item)
removeItem
in interface HasFastTreeItems
item
- the item to be removedpublic void removeItems()
public void removeKeyboardListener(com.google.gwt.user.client.ui.KeyboardListener listener)
removeKeyboardListener
in interface com.google.gwt.user.client.ui.SourcesKeyboardEvents
public void setAccessKey(char key)
setAccessKey
in interface com.google.gwt.user.client.ui.HasFocus
public void setFocus(boolean focus)
setFocus
in interface com.google.gwt.user.client.ui.HasFocus
public void setSelectedItem(FastTreeItem item)
item
- the item to be selected, or null
to deselect all
itemspublic void setSelectedItem(FastTreeItem item, boolean fireEvents)
item
- the item to be selected, or null
to deselect all
itemsfireEvents
- true
to allow selection events to be firedpublic void setTabIndex(int index)
setTabIndex
in interface com.google.gwt.user.client.ui.HasFocus
public java.util.Iterator treeItemIterator()
protected void doAttachChildren()
doAttachChildren
in class com.google.gwt.user.client.ui.Panel
protected void doDetachChildren()
doDetachChildren
in class com.google.gwt.user.client.ui.Panel
protected FastTreeItem getRoot()
protected void moveSelectionBar(FastTreeItem item)
FastTreeItem
.
item
- the item to move selection bar toprotected void onLoad()
onLoad
in class com.google.gwt.user.client.ui.Panel
protected void onSelection(FastTreeItem item, boolean fireEvents, boolean moveFocus)
protected void onUnload()
onUnload
in class com.google.gwt.user.client.ui.Panel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |