|
||||||||||
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.widgetideas.client.FastTreeItem
public class FastTreeItem
An item that can be contained within a
FastTree
.
Nested Class Summary |
---|
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 | |
---|---|
FastTreeItem()
Creates an empty tree item. |
|
FastTreeItem(java.lang.String html)
Constructs a tree item with the given HTML. |
|
FastTreeItem(com.google.gwt.user.client.ui.Widget widget)
Constructs a tree item with the given Widget . |
Method Summary | |
---|---|
void |
addItem(FastTreeItem item)
Adds another item as a child to this one. |
FastTreeItem |
addItem(java.lang.String itemText)
Adds a child tree item containing the specified text. |
FastTreeItem |
addItem(com.google.gwt.user.client.ui.Widget widget)
Adds a child tree item containing the specified widget. |
void |
becomeInteriorNode()
Become an interior node. |
void |
becomeLeafNode()
Become a leaf node. |
protected void |
beforeClose()
Called before the tree item is closed. |
protected void |
beforeOpen()
Called before the tree item is opened. |
protected boolean |
beforeSelectionLost()
Called when tree item is being unselected. |
protected void |
ensureChildren()
Fired when a tree item receives a request to open for the first time. |
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. |
int |
getControlImageWidth()
Returns the width of the control open/close image. |
protected com.google.gwt.user.client.ui.HasFocus |
getFocusableWidget()
Returns the widget, if any, that should be focused on if this TreeItem is selected. |
java.lang.String |
getHTML()
|
FastTreeItem |
getParentItem()
Gets this item's parent. |
java.lang.String |
getText()
|
FastTree |
getTree()
Gets the tree that contains this item. |
com.google.gwt.user.client.ui.Widget |
getWidget()
Gets the Widget associated with this tree item. |
boolean |
hasBeenOpened()
Has this FastTreeItem ever been opened? |
boolean |
isInteriorNode()
Does this FastTreeItem represent an interior node? |
boolean |
isLeafNode()
Is this FastTreeItem a leaf node? |
boolean |
isOpen()
Is the FastTreeItem open? Returns false if the FastTreeItem
is closed or a leaf node. |
boolean |
isSelected()
Determines whether this item is currently selected. |
boolean |
isShowing()
Returns whether the tree is currently showing this FastTreeItem . |
protected void |
onSelected()
Called when a tree item is selected. |
void |
remove()
Removes this item from its tree. |
void |
removeItem(FastTreeItem item)
Removes an item from the tree. |
void |
removeItems()
Removes all of this item's children. |
void |
setHTML(java.lang.String html)
|
void |
setState(boolean open)
Sets whether this item's children are displayed. |
void |
setState(boolean open,
boolean fireEvents)
Sets whether this item's children are displayed. |
void |
setText(java.lang.String text)
|
void |
setWidget(com.google.gwt.user.client.ui.Widget widget)
|
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, 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 FastTreeItem()
public FastTreeItem(java.lang.String html)
html
- the item's HTMLpublic FastTreeItem(com.google.gwt.user.client.ui.Widget widget)
Widget
.
widget
- the item's widgetMethod Detail |
---|
public void addItem(FastTreeItem item)
HasFastTreeItems
addItem
in interface HasFastTreeItems
item
- the item to be addedpublic FastTreeItem addItem(java.lang.String itemText)
HasFastTreeItems
addItem
in interface HasFastTreeItems
itemText
- the text to be added
public FastTreeItem addItem(com.google.gwt.user.client.ui.Widget widget)
HasFastTreeItems
addItem
in interface HasFastTreeItems
widget
- the widget to be added
public void becomeInteriorNode()
public void becomeLeafNode()
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 int getControlImageWidth()
public java.lang.String getHTML()
getHTML
in interface com.google.gwt.user.client.ui.HasHTML
public FastTreeItem getParentItem()
public java.lang.String getText()
getText
in interface com.google.gwt.user.client.ui.HasText
public final FastTree getTree()
public com.google.gwt.user.client.ui.Widget getWidget()
Widget
associated with this tree item.
public boolean hasBeenOpened()
FastTreeItem
ever been opened?
FastTreeItem
has ever been opened.public boolean isInteriorNode()
FastTreeItem
represent an interior node?
public boolean isLeafNode()
FastTreeItem
a leaf node?
public boolean isOpen()
FastTreeItem
open? Returns false if the FastTreeItem
is closed or a leaf node.
public boolean isSelected()
true
if it is selectedpublic boolean isShowing()
FastTreeItem
.
public void remove()
public void removeItem(FastTreeItem item)
removeItem
in interface HasFastTreeItems
item
- the item to be removedpublic void removeItems()
public void setHTML(java.lang.String html)
setHTML
in interface com.google.gwt.user.client.ui.HasHTML
public final void setState(boolean open)
open
- whether the item is openpublic void setState(boolean open, boolean fireEvents)
open
- whether the item is openfireEvents
- true
to allow open/close events to be
firedpublic void setText(java.lang.String text)
setText
in interface com.google.gwt.user.client.ui.HasText
public void setWidget(com.google.gwt.user.client.ui.Widget widget)
protected void beforeClose()
protected void beforeOpen()
protected boolean beforeSelectionLost()
false
cancels the unselection.
protected void ensureChildren()
protected com.google.gwt.user.client.ui.HasFocus getFocusableWidget()
protected void onSelected()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |