|
|||||||||
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.gwtext.client.widgets.Component
com.gwtext.client.widgets.BoxComponent
com.gwtext.client.widgets.Container
com.gwtext.client.widgets.Panel
com.gwtext.client.widgets.TabPanel
public class TabPanel
A lightweight tab container.
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.gwtext.client.widgets.Component |
---|
config, id |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
TabPanel()
|
|
TabPanel(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Method Summary | |
---|---|
void |
activate(int tabIndex)
Activates a tab panel. |
void |
activate(java.lang.String tabID)
Activates a tab panel. |
void |
addListener(TabPanelListener listener)
Add a TabPanel listner. |
void |
beginUpdate()
Disables tab resizing while tabs are being added (if resizeTabs is false this does nothing). |
protected com.google.gwt.core.client.JavaScriptObject |
create(com.google.gwt.core.client.JavaScriptObject config)
|
void |
endUpdate()
Stops an update and resizes the tabs (if resizeTabs is false this does nothing). |
Panel |
getActiveTab()
Gets the currently active tab. |
protected com.google.gwt.core.client.JavaScriptObject |
getConfigPrototype()
|
Panel |
getItem(java.lang.String id)
Gets the specified tab by id. |
int |
getMinTabWidth()
Return the min tab width. |
int |
getScrollDuration()
The number of milliseconds that each scroll animation should last (defaults to .35). |
int |
getScrollIncrement()
The number of pixels to scroll each time a tab scroll button is pressed (defaults to 100, or if resizeTabs = true, the calculated tab width). |
int |
getScrollRepeatInterval()
Number of milliseconds between each scroll while a tab scroll button is continuously pressed (defaults to 400). |
com.google.gwt.user.client.Element |
getTabEl(Panel panel)
Gets the DOM element for tab strip item which activates the child panel with the specified ID. |
int |
getTabMargin()
The number of pixels of space to calculate into the sizing and scrolling of tabs. |
java.lang.String |
getTabPosition()
|
int |
getTabWidth()
The initial width in pixels of each new tab (defaults to 120). |
int |
getWheelIncrement()
For scrolling tabs, the number of pixels to increment on mouse wheel scrolling (defaults to 20). |
java.lang.String |
getXType()
Gets the xtype for this component as registered with ComponentMgr. |
boolean |
hasItem(java.lang.String id)
Check if the TabPanel has the specified tab. |
void |
hideTabStripItem(int index)
Hides the tab strip item for the passed tab. |
void |
hideTabStripItem(Panel panel)
Hides the tab strip item for the passed tab. |
void |
hideTabStripItem(java.lang.String id)
Hides the tab strip item for the passed tab. |
boolean |
isAnimScroll()
True to animate tab scrolling so that hidden tabs slide smoothly into view (defaults to true). |
boolean |
isDeferredRender()
Internally, the TabPanel uses a CardLayout to manage its tabs. |
boolean |
isEnableTabScroll()
True to enable scrolling to tabs that may be invisible due to overflowing the overall TabPanel width. |
boolean |
isLayoutOnTabChange()
True to do a layout of tab items as tabs are changed. |
boolean |
isPlain()
True to render the tab strip without a background container image (defaults to false). |
boolean |
isResizeTabs()
|
void |
scrollToTab(Panel panel,
boolean animate)
Scrolls to a particular tab if tab scrolling is enabled. |
void |
setActiveItem(int activeItem)
A string component id or the numeric index of the component that should be initially activated within the container's layout on render. |
void |
setActiveItemID(java.lang.String activeItem)
A string component id or the numeric index of the component that should be initially activated within the container's layout on render. |
void |
setActiveTab(int activeTab)
The numeric index of the tab that should be initially activated on render (defaults to none). |
void |
setActiveTab(java.lang.String activeTab)
The id of the tab that should be initially activated on render (defaults to none). |
void |
setAnimScroll(boolean animScroll)
True to animate tab scrolling so that hidden tabs slide smoothly into view (defaults to true). |
void |
setDeferredRender(boolean deferredRender)
Internally, the TabPanel uses a CardLayout to manage its tabs. |
void |
setEnableTabScroll(boolean enableTabScroll)
True to enable scrolling to tabs that may be invisible due to overflowing the overall TabPanel width. |
void |
setLayout(ContainerLayout layout)
The layout type to be used in this container. |
void |
setLayoutOnTabChange(boolean layoutOnTabChange)
Set to true to do a layout of tab items as tabs are changed. |
void |
setMinTabWidth(int minTabWidth)
The minimum width in pixels for each tab when resizeTabs = true (defaults to 30). |
void |
setPlain(boolean plain)
True to render the tab strip without a background container image (defaults to false). |
void |
setResizeTabs(boolean resizeTabs)
True to automatically resize each tab so that the tabs will completely fill the tab strip (defaults to false). |
void |
setResizeTabsRendered(boolean resizeTabs)
|
void |
setScrollDuration(int scrollDuration)
The number of milliseconds that each scroll animation should last (defaults to .35). |
void |
setScrollIncrement(int scrollIncrement)
The number of pixels to scroll each time a tab scroll button is pressed (defaults to 100, or if resizeTabs = true, the calculated tab width). |
void |
setScrollRepeatInterval(int scrollRepeatInterval)
Number of milliseconds between each scroll while a tab scroll button is continuously pressed (defaults to 400). |
void |
setTabMargin(int tabMargin)
The number of pixels of space to calculate into the sizing and scrolling of tabs. |
void |
setTabPosition(Position tabPosition)
The position where the tab strip should be rendered (defaults to 'top'). |
void |
setTabWidth(int tabWidth)
The initial width in pixels of each new tab (defaults to 120). |
void |
setWheelIncrement(int wheelIncrement)
For scrolling tabs, the number of pixels to increment on mouse wheel scrolling (defaults to 20). |
void |
unhideTabStripItem(int index)
Unhides the tab strip item for the passed tab. |
void |
unhideTabStripItem(Panel panel)
Unhides the tab strip item for the passed tab. |
void |
unhideTabStripItem(java.lang.String id)
Unhides the tab strip item for the passed tab. |
Methods inherited from class com.gwtext.client.widgets.Container |
---|
add, add, add, add, addListener, bubble, cascade, clear, doLayout, doLayout, findBy, findByID, findByType, getActiveItem, getActiveItemID, getAutoDestroy, getBufferResize, getComponent, getComponent, getComponents, getHideBorders, getItems, getLayout, getMonitorResize, insert, iterator, remove, remove, remove, remove, removeAll, removeAll, setAutoDestroy, setBufferResize, setDefaults, setHideBorders, setMonitorResize |
Methods inherited from class com.gwtext.client.widgets.BoxComponent |
---|
addListener, doOnRender, doOnRender, getAutoHeight, getAutoWidth, getBox, getBox, getHeight, getPosition, getPosition, getSize, getWidth, setAutoHeight, setAutoWidth, setHeight, setHeight, setPagePosition, setPosition, setSize, setSize, setWidth, setWidth, syncSize, updateBox |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, setElement, setPixelSize, setStyleName, setStyleName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TabPanel()
public TabPanel(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail |
---|
protected com.google.gwt.core.client.JavaScriptObject getConfigPrototype()
getConfigPrototype
in class Panel
public java.lang.String getXType()
Component
TextField field = new TextField();
field.getXType() returns "textfield"
getXType
in class Panel
protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
create
in class Panel
public int getMinTabWidth()
public boolean isResizeTabs()
public void setResizeTabsRendered(boolean resizeTabs)
public java.lang.String getTabPosition()
public void setActiveItemID(java.lang.String activeItem)
Container
AccordionLayout
, CardLayout
and FitLayout
).
setActiveItemID
in class Container
activeItem
- the active Item IDpublic void setActiveItem(int activeItem)
Container
AccordionLayout
, CardLayout
and FitLayout
).
setActiveItem
in class Container
activeItem
- the active Item IDpublic void setLayout(ContainerLayout layout)
Container
setLayout
in class Container
layout
- the layout to usepublic void activate(java.lang.String tabID)
tabID
- the tab idpublic void activate(int tabIndex)
tabIndex
- the tab indexpublic void beginUpdate()
public void endUpdate()
public Panel getActiveTab()
public Panel getItem(java.lang.String id)
id
- the tab id
public com.google.gwt.user.client.Element getTabEl(Panel panel)
panel
- the panel
public void hideTabStripItem(java.lang.String id)
id
- the tab idpublic void hideTabStripItem(int index)
index
- the tab indexpublic void hideTabStripItem(Panel panel)
panel
- the tab panelpublic void scrollToTab(Panel panel, boolean animate)
panel
- the panel to scroll toanimate
- true to animatepublic void unhideTabStripItem(java.lang.String id)
id
- the tab idpublic void unhideTabStripItem(int index)
index
- the tab indexpublic void unhideTabStripItem(Panel panel)
panel
- the tab panelpublic boolean hasItem(java.lang.String id)
id
- the tab id
public void addListener(TabPanelListener listener)
listener
- the listenerpublic void setActiveTab(int activeTab)
activeTab
- the active tab indexpublic void setActiveTab(java.lang.String activeTab)
activeTab
- the active tab IDpublic void setAnimScroll(boolean animScroll) throws java.lang.IllegalStateException
animScroll
- true to animate tab scrolling
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedsetEnableTabScroll(boolean)
public boolean isAnimScroll()
public void setDeferredRender(boolean deferredRender) throws java.lang.IllegalStateException
deferredRender
- true to defer rendering
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic boolean isDeferredRender()
public void setEnableTabScroll(boolean enableTabScroll) throws java.lang.IllegalStateException
enableTabScroll
- true to enable tab scroll
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic boolean isEnableTabScroll()
public void setLayoutOnTabChange(boolean layoutOnTabChange) throws java.lang.IllegalStateException
layoutOnTabChange
- true to do a layout of tab items as tabs are changed (default true)
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic boolean isLayoutOnTabChange()
public void setMinTabWidth(int minTabWidth)
minTabWidth
- the min tab widthpublic void setPlain(boolean plain) throws java.lang.IllegalStateException
plain
- true for plain tabs
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic boolean isPlain()
public void setResizeTabs(boolean resizeTabs)
resizeTabs
- true to resize tabspublic void setScrollDuration(int scrollDuration) throws java.lang.IllegalStateException
scrollDuration
- scroll duration
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic int getScrollDuration()
public void setScrollIncrement(int scrollIncrement) throws java.lang.IllegalStateException
scrollIncrement
- the scroll increment
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic int getScrollIncrement()
public void setScrollRepeatInterval(int scrollRepeatInterval) throws java.lang.IllegalStateException
scrollRepeatInterval
- the scroll repeat interval
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic int getScrollRepeatInterval()
public void setTabMargin(int tabMargin) throws java.lang.IllegalStateException
tabMargin
- the tab margin
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic int getTabMargin()
public void setTabPosition(Position tabPosition) throws java.lang.IllegalStateException
tabPosition
- the tab position
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedPosition.TOP
,
Position.BOTTOM
public void setTabWidth(int tabWidth) throws java.lang.IllegalStateException
tabWidth
- the tab width
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic int getTabWidth()
public void setWheelIncrement(int wheelIncrement) throws java.lang.IllegalStateException
wheelIncrement
- the wheel increment
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic int getWheelIncrement()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |