|
||||||||||
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.Composite
net.pleso.framework.client.ui.controls.tabcontrol.TabPanel
public class TabPanel
A panel that represents a tabbed set of pages, each of which contains another widget. Its child widgets are shown as the user selects the various tabs associated with them. The tabs can contain arbitrary HTML. Modified for "Close tab" button functionality.
Note that this widget is not a panel per se, but rather a
Composite
that aggregates a
TabBar
and a
DeckPanel
. It does, however, implement
HasWidgets
.
Constructor Summary | |
---|---|
TabPanel()
Creates an empty tab panel. |
Method Summary | |
---|---|
void |
add(com.google.gwt.user.client.ui.Widget w)
|
void |
add(com.google.gwt.user.client.ui.Widget w,
java.lang.String tabText)
Adds a widget to the tab panel. |
void |
add(com.google.gwt.user.client.ui.Widget w,
java.lang.String tabText,
boolean asHTML)
Adds a widget to the tab panel. |
void |
addTabListener(com.google.gwt.user.client.ui.TabListener listener)
|
void |
clear()
|
void |
fireBeforeRemoveTab(int index)
Calls when before remove tab event |
com.google.gwt.user.client.ui.DeckPanel |
getDeckPanel()
Gets the deck panel within this tab panel. |
RemoveTabListener |
getRemoveTabListener()
|
TabBar |
getTabBar()
Gets the tab bar within this tab panel. |
com.google.gwt.user.client.ui.Widget |
getWidget(int index)
|
int |
getWidgetCount()
|
int |
getWidgetIndex(com.google.gwt.user.client.ui.Widget widget)
|
void |
insert(com.google.gwt.user.client.ui.Widget widget,
java.lang.String tabText,
boolean asHTML,
int beforeIndex)
Inserts a widget into the tab panel. |
void |
insert(com.google.gwt.user.client.ui.Widget widget,
java.lang.String tabText,
int beforeIndex)
Inserts a widget into the tab panel. |
java.util.Iterator |
iterator()
|
boolean |
onBeforeTabSelected(com.google.gwt.user.client.ui.SourcesTabEvents sender,
int tabIndex)
|
void |
onTabSelected(com.google.gwt.user.client.ui.SourcesTabEvents sender,
int tabIndex)
|
boolean |
remove(int index)
|
boolean |
remove(com.google.gwt.user.client.ui.Widget widget)
Removes the given widget, and its associated tab. |
void |
removeTabListener(com.google.gwt.user.client.ui.TabListener listener)
|
void |
selectTab(int index)
Programmatically selects the specified tab. |
void |
setRemoveTabListener(RemoveTabListener removeTabListener)
|
Methods inherited from class com.google.gwt.user.client.ui.Composite |
---|
getElement |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
getParent, isAttached, onBrowserEvent, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleName, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TabPanel()
Method Detail |
---|
public void add(com.google.gwt.user.client.ui.Widget w)
add
in interface com.google.gwt.user.client.ui.HasWidgets
public void add(com.google.gwt.user.client.ui.Widget w, java.lang.String tabText)
w
- the widget to be addedtabText
- the text to be shown on its tabpublic void add(com.google.gwt.user.client.ui.Widget w, java.lang.String tabText, boolean asHTML)
w
- the widget to be addedtabText
- the text to be shown on its tabasHTML
- true
to treat the specified text as HTMLpublic void addTabListener(com.google.gwt.user.client.ui.TabListener listener)
addTabListener
in interface com.google.gwt.user.client.ui.SourcesTabEvents
public void clear()
clear
in interface com.google.gwt.user.client.ui.HasWidgets
public com.google.gwt.user.client.ui.DeckPanel getDeckPanel()
public TabBar getTabBar()
public com.google.gwt.user.client.ui.Widget getWidget(int index)
getWidget
in interface com.google.gwt.user.client.ui.IndexedPanel
public int getWidgetCount()
getWidgetCount
in interface com.google.gwt.user.client.ui.IndexedPanel
public int getWidgetIndex(com.google.gwt.user.client.ui.Widget widget)
getWidgetIndex
in interface com.google.gwt.user.client.ui.IndexedPanel
public void insert(com.google.gwt.user.client.ui.Widget widget, java.lang.String tabText, boolean asHTML, int beforeIndex)
widget
- the widget to be insertedtabText
- the text to be shown on its tabasHTML
- true
to treat the specified text as HTMLbeforeIndex
- the index before which it will be insertedpublic void insert(com.google.gwt.user.client.ui.Widget widget, java.lang.String tabText, int beforeIndex)
widget
- the widget to be insertedtabText
- the text to be shown on its tabbeforeIndex
- the index before which it will be insertedpublic java.util.Iterator iterator()
iterator
in interface com.google.gwt.user.client.ui.HasWidgets
public boolean onBeforeTabSelected(com.google.gwt.user.client.ui.SourcesTabEvents sender, int tabIndex)
onBeforeTabSelected
in interface com.google.gwt.user.client.ui.TabListener
public void onTabSelected(com.google.gwt.user.client.ui.SourcesTabEvents sender, int tabIndex)
onTabSelected
in interface com.google.gwt.user.client.ui.TabListener
public boolean remove(int index)
remove
in interface com.google.gwt.user.client.ui.IndexedPanel
public boolean remove(com.google.gwt.user.client.ui.Widget widget)
remove
in interface com.google.gwt.user.client.ui.HasWidgets
widget
- the widget to be removedpublic void removeTabListener(com.google.gwt.user.client.ui.TabListener listener)
removeTabListener
in interface com.google.gwt.user.client.ui.SourcesTabEvents
public void selectTab(int index)
index
- the index of the tab to be selectedpublic RemoveTabListener getRemoveTabListener()
public void setRemoveTabListener(RemoveTabListener removeTabListener)
public void fireBeforeRemoveTab(int index)
RemoveTabListener
fireBeforeRemoveTab
in interface RemoveTabListener
index
- index of tab
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |