|
|||||||||
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.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.tab.TabSet
public class TabSet
The TabSet class allows components on several panes to share the same space. The tabs at the top can be selected by the user to show each pane.
Tabs are configured via the tabs
property, each of which has a
pane
property which will be displayed in the main pane when that tab is
selected.
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.smartgwt.client.widgets.BaseWidget |
---|
config, configOnly, id, isElementSet |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
TabSet()
|
|
TabSet(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Method Summary | |
---|---|
HandlerRegistration |
addCloseClickHandler(CloseClickHandler handler)
Add a onCloseClick handler. |
void |
addTab(Tab tab)
Add a tab |
HandlerRegistration |
addTabDeselectedHandler(TabDeselectedHandler handler)
Add a tabDeselected handler. |
HandlerRegistration |
addTabIconClickHandler(TabIconClickHandler handler)
Add a tabIconClick handler. |
HandlerRegistration |
addTabSelectedHandler(TabSelectedHandler handler)
Add a tabSelected handler. |
protected com.google.gwt.core.client.JavaScriptObject |
create()
|
void |
disableTab(int tabIndex)
If the specified tab is enabled, disable it now. |
void |
disableTab(java.lang.String ID)
If the specified tab is enabled, disable it now. |
void |
disableTab(Tab tab)
If the specified tab is enabled, disable it now. |
void |
enableTab(int tabIndex)
If the specified tab is disabled, enable it now. |
void |
enableTab(java.lang.String ID)
If the specified tab is disabled, enable it now. |
void |
enableTab(Tab tab)
If the specified tab is disabled, enable it now. |
java.lang.Boolean |
getAnimateTabScrolling()
If showTabScroller is true, should tabs be scrolled into view via an
animation when the user interacts with the scroller buttons? |
java.lang.Boolean |
getCanCloseTabs()
Should tabs in this tabSet show an icon allowing the user to dismiss the tab by clicking on it directly. |
java.lang.String |
getCloseTabIcon()
Default src for the close icon for tabs to display if canCloseTabs is true. |
int |
getCloseTabIconSize()
Size in pixels of the icon for closing tabs, displayed when canCloseTabs is true. |
java.lang.Boolean |
getDestroyPanes()
Whether BaseWidget.destroy() should be called on pane when it a tab is
removed via removeTab(int) }. |
int |
getNumTabs()
The number of tabs |
static TabSet |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Overflow |
getPaneContainerOverflow()
Specifies the overflow of the pane container (the component that holds the pane contents for all tabs). |
java.lang.String |
getPickerButtonHSrc()
If showTabPicker is true, and symmetricPickerButton is
set to true, this property governs the base URL for the picker
button image, when displayed in a horizontal tab-bar [IE tabBarPosition is
set to "top" or "bottom" ].
|
int |
getPickerButtonSize()
If showTabPicker is true, this property governs the size of tab-picker
button. |
java.lang.String |
getPickerButtonSrc()
If showTabPicker is true, this property governs the base URL for the picker
button image, when symmetricPickerButton is set to false
|
java.lang.String |
getPickerButtonVSrc()
If showTabPicker is true, and symmetricPickerButton is
set to true, this property governs the base URL for the picker
button image, when displayed in a verricaL tab-bar [IE tabBarPosition is
set to "LEFT" or "right" ].
|
int |
getScrollerButtonSize()
If showTabScroller is true, this property governs the size of scroller
buttons. |
java.lang.String |
getScrollerHSrc()
If this TabSet is showing showTabScroller , and
symmetricScroller is true, this property governs the base
URL for the tab bar back and forward scroller button images for horizontal tab bars [IE for
tab sets with tabBarPosition set to "top" or "bottom"].
|
java.lang.String |
getScrollerSrc()
If this TabSet is showing showTabScroller , and
symmetricScroller is false, this property governs the base
URL for the tab bar back and forward scroller button images.
|
java.lang.String |
getScrollerVSrc()
If this TabSet is showing showTabScroller , and
symmetricScroller is true, this property governs the base
URL for the tab bar back and forward scroller button images for vertical tab bars [IE for
tab sets with tabBarPosition set to "left" or "right"].
|
Tab |
getSelectedTab()
The currently selected tab. |
int |
getSelectedTabNumber()
Returns the index of the currently selected tab object. |
java.lang.Boolean |
getShowPaneContainerEdges()
Should the paneContainer for this tabset show showEdges . |
java.lang.Boolean |
getShowPartialEdges()
If the paneContainer for this tab set is showing showEdges , setting this
attribute to true will set the paneContainer to show
customEdges for the three sides opposing the tabBarPosition. |
java.lang.Boolean |
getShowTabPicker()
If there is not enough space to display all the tab-buttons in this tabSet, should a drop-down "picker" be displayed to allow selection of tabs that are clipped? |
java.lang.Boolean |
getShowTabScroller()
If there is not enough space to display all the tab-buttons in this tabSet, should scroller buttons be displayed to allow access to tabs that are clipped? |
java.lang.String |
getSkinImgDir()
Default directory for skin images (those defined by the class), relative to the Page-wide Page.getSkinDir() . |
java.lang.Boolean |
getSymmetricEdges()
If this tabSet will showPaneContainerEdges for the paneContainer,
this property determines whether the same edge media will be used regardless of the tab
bar position, or whether different media should be used (necessary if the edge appearance is
not symmetrical on all sides).
|
java.lang.Boolean |
getSymmetricPickerButton()
If this TabSet is showing a showTabPicker , this
property determines whether the pickerButtonHSrc and
pickerButtonVSrc media will be used for vertical and horizontal tab-bar
picker buttons, or whether separate media should be used for each possible
tabBarPosition based on the pickerButtonSrc
property for this tabSet. |
java.lang.Boolean |
getSymmetricScroller()
If this TabSet is showing showTabScroller , this property
determines whether the scrollerHSrc and scrollerVSrc media
will be used for vertical and horizontal tab-bar scroller buttons, or whether separate
media should be used for each possible tabBarPosition based
on the scrollerSrc property for this tabSet. |
Tab |
getTab(int tabIndex)
Get the live Canvas representing a tab by index or ID. |
Tab |
getTab(java.lang.String ID)
Get the live Canvas representing a tab by index or ID. |
Side |
getTabBarAlign()
Alignment of the tabBar. |
Side |
getTabBarPosition()
Which side of the TabSet the TabBar should appear on. |
int |
getTabBarThickness()
Thickness of tabBar, applies to either orientation (specifies height for horizontal, width for vertical orientation). |
Tab[] |
getTabs()
The tabs |
void |
removeTab(int tabIndex)
Remove a tab. |
void |
removeTab(java.lang.String ID)
Remove a tab. |
void |
removeTab(Tab tab)
Remove a tab. |
void |
removeTabs(int[] tabIndexes)
Remove one or more tabs. |
void |
removeTabs(java.lang.String[] ids)
Remove one or more tabs. |
void |
scrollBack()
If there is not enough space to display all the tabs in this tabSet, this method will scroll the previous tab (that first tab that is clipped at the beginning of the tab-bar) into view. |
void |
scrollForward()
If there is not enough space to display all the tabs in this tabSet, this method will scroll the next tab (that first tab that is clipped at the end of the tab-bar) into view. |
void |
selectTab(int tabIndex)
Select a tab. |
void |
selectTab(java.lang.String ID)
Select a tab. |
void |
selectTab(Tab tab)
Select a tab. |
void |
setAnimateTabScrolling(java.lang.Boolean animateTabScrolling)
If showTabScroller is true, should tabs be scrolled into view via an
animation when the user interacts with the scroller buttons? |
void |
setCanCloseTabs(java.lang.Boolean canCloseTabs)
Should tabs in this tabSet show an icon allowing the user to dismiss the tab by clicking on it directly. |
void |
setCloseTabIcon(java.lang.String closeTabIcon)
Default src for the close icon for tabs to display if canCloseTabs is true. |
void |
setCloseTabIconSize(int closeTabIconSize)
Size in pixels of the icon for closing tabs, displayed when canCloseTabs is true. |
void |
setDestroyPanes(java.lang.Boolean destroyPanes)
Whether BaseWidget.destroy() should be called on pane when it a tab is
removed via removeTab(int) }. |
void |
setPaneContainerOverflow(Overflow paneContainerOverflow)
Specifies the overflow of the pane container (the component that holds the pane contents for all tabs). |
void |
setPickerButtonHSrc(java.lang.String pickerButtonHSrc)
If showTabPicker is true, and symmetricPickerButton is
set to true, this property governs the base URL for the picker
button image, when displayed in a horizontal tab-bar [IE tabBarPosition is
set to "top" or "bottom" ].
|
void |
setPickerButtonSize(int pickerButtonSize)
If showTabPicker is true, this property governs the size of tab-picker
button. |
void |
setPickerButtonSrc(java.lang.String pickerButtonSrc)
If showTabPicker is true, this property governs the base URL for the picker
button image, when symmetricPickerButton is set to false
|
void |
setPickerButtonVSrc(java.lang.String pickerButtonVSrc)
If showTabPicker is true, and symmetricPickerButton is
set to true, this property governs the base URL for the picker
button image, when displayed in a verricaL tab-bar [IE tabBarPosition is
set to "LEFT" or "right" ].
|
void |
setScrollerButtonSize(int scrollerButtonSize)
If showTabScroller is true, this property governs the size of scroller
buttons. |
void |
setScrollerHSrc(java.lang.String scrollerHSrc)
If this TabSet is showing showTabScroller , and
symmetricScroller is true, this property governs the base
URL for the tab bar back and forward scroller button images for horizontal tab bars [IE for
tab sets with tabBarPosition set to "top" or "bottom"].
|
void |
setScrollerSrc(java.lang.String scrollerSrc)
If this TabSet is showing showTabScroller , and
symmetricScroller is false, this property governs the base
URL for the tab bar back and forward scroller button images.
|
void |
setScrollerVSrc(java.lang.String scrollerVSrc)
If this TabSet is showing showTabScroller , and
symmetricScroller is true, this property governs the base
URL for the tab bar back and forward scroller button images for vertical tab bars [IE for
tab sets with tabBarPosition set to "left" or "right"].
|
void |
setSelectedTab(int selectedTab)
Specifies the index of the initially selected tab. |
void |
setShowPaneContainerEdges(java.lang.Boolean showPaneContainerEdges)
Should the paneContainer for this tabset show showEdges . |
void |
setShowPartialEdges(java.lang.Boolean showPartialEdges)
If the paneContainer for this tab set is showing showEdges , setting this
attribute to true will set the paneContainer to show
customEdges for the three sides opposing the tabBarPosition. |
void |
setShowTabPicker(java.lang.Boolean showTabPicker)
If there is not enough space to display all the tab-buttons in this tabSet, should a drop-down "picker" be displayed to allow selection of tabs that are clipped? |
void |
setShowTabScroller(java.lang.Boolean showTabScroller)
If there is not enough space to display all the tab-buttons in this tabSet, should scroller buttons be displayed to allow access to tabs that are clipped? |
void |
setSkinImgDir(java.lang.String skinImgDir)
Default directory for skin images (those defined by the class), relative to the Page-wide Page.getSkinDir() . |
void |
setSymmetricEdges(java.lang.Boolean symmetricEdges)
If this tabSet will showPaneContainerEdges for the paneContainer,
this property determines whether the same edge media will be used regardless of the tab
bar position, or whether different media should be used (necessary if the edge appearance is
not symmetrical on all sides).
|
void |
setSymmetricPickerButton(java.lang.Boolean symmetricPickerButton)
If this TabSet is showing a showTabPicker , this
property determines whether the pickerButtonHSrc and
pickerButtonVSrc media will be used for vertical and horizontal tab-bar
picker buttons, or whether separate media should be used for each possible
tabBarPosition based on the pickerButtonSrc
property for this tabSet. |
void |
setSymmetricScroller(java.lang.Boolean symmetricScroller)
If this TabSet is showing showTabScroller , this property
determines whether the scrollerHSrc and scrollerVSrc media
will be used for vertical and horizontal tab-bar scroller buttons, or whether separate
media should be used for each possible tabBarPosition based
on the scrollerSrc property for this tabSet. |
void |
setTabBarAlign(Side tabBarAlign)
Alignment of the tabBar. |
void |
setTabBarControls(java.lang.Object... tabBarControls)
This property determines what controls should show up after the tabBar for this tabSet. |
void |
setTabBarPosition(Side tabBarPosition)
Which side of the TabSet the TabBar should appear on. |
void |
setTabBarThickness(int tabBarThickness)
Thickness of tabBar, applies to either orientation (specifies height for horizontal, width for vertical orientation). |
void |
setTabIcon(int tabIndex,
java.lang.String iconURL)
Changes the icon of a tab |
void |
setTabIcon(java.lang.String ID,
java.lang.String iconURL)
Changes the icon of a tab |
void |
setTabIcon(Tab tab,
java.lang.String iconURL)
Changes the icon of a tab |
void |
setTabPane(int tabIndex,
Canvas pane)
Apply a new pane to an existing tab in this tabSet |
void |
setTabPane(java.lang.String tabID,
Canvas pane)
Apply a new pane to an existing tab in this tabSet |
void |
setTabs(Tab... tabs)
|
void |
setTabTitle(int tabIndex,
java.lang.String title)
Changes the title of a tab |
void |
setTabTitle(java.lang.String ID,
java.lang.String title)
Changes the title of a tab |
void |
setTabTitle(Tab tab,
java.lang.String title)
Changes the title of a tab |
void |
updateTab(int tabIndex,
Canvas pane)
|
void |
updateTab(Tab tab,
Canvas pane)
|
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 |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public TabSet()
public TabSet(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail |
---|
public static TabSet getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
protected com.google.gwt.core.client.JavaScriptObject create()
create
in class Canvas
public void setTabBarPosition(Side tabBarPosition) throws java.lang.IllegalStateException
tabBarPosition
- tabBarPosition Default value is Canvas.TOP
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic Side getTabBarPosition()
public void setTabBarAlign(Side tabBarAlign) throws java.lang.IllegalStateException
If the position of the tabBar is "top" or "bottom", then alignment must be "left" or "right" and defaults to "left".
If the position of the tabBar is "left" or "right", then the alignment must be "top" or "bottom" and defaults to "top".
tabBarAlign
- tabBarAlign Default value is see below
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic Side getTabBarAlign()
If the position of the tabBar is "top" or "bottom", then alignment must be "left" or "right" and defaults to "left".
If the position of the tabBar is "left" or "right", then the alignment must be "top" or "bottom" and defaults to "top".
public void setTabBarThickness(int tabBarThickness)
tabBarThickness
- tabBarThickness Default value is 21public int getTabBarThickness()
public void setCanCloseTabs(java.lang.Boolean canCloseTabs)
canClose
.closeTabIcon
by
default, but may be overridden by explicitly specifying closeIcon
.
canCloseTabs
- canCloseTabs Default value is nullpublic java.lang.Boolean getCanCloseTabs()
canClose
.closeTabIcon
by
default, but may be overridden by explicitly specifying closeIcon
.
public void setCloseTabIcon(java.lang.String closeTabIcon) throws java.lang.IllegalStateException
canCloseTabs
is true.
closeTabIcon
- closeTabIcon Default value is [SKIN]/TabSet/close.png
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getCloseTabIcon()
canCloseTabs
is true.
public void setCloseTabIconSize(int closeTabIconSize) throws java.lang.IllegalStateException
canCloseTabs
is true.
closeTabIconSize
- closeTabIconSize Default value is 16
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getCloseTabIconSize()
canCloseTabs
is true.
public void setShowTabScroller(java.lang.Boolean showTabScroller) throws java.lang.IllegalStateException
showTabScroller
- showTabScroller Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowTabScroller()
public void setShowTabPicker(java.lang.Boolean showTabPicker) throws java.lang.IllegalStateException
showTabPicker
- showTabPicker Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowTabPicker()
public void setAnimateTabScrolling(java.lang.Boolean animateTabScrolling) throws java.lang.IllegalStateException
showTabScroller
is true, should tabs be scrolled into view via an
animation when the user interacts with the scroller buttons?
animateTabScrolling
- animateTabScrolling Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getAnimateTabScrolling()
showTabScroller
is true, should tabs be scrolled into view via an
animation when the user interacts with the scroller buttons?
public void setScrollerButtonSize(int scrollerButtonSize) throws java.lang.IllegalStateException
showTabScroller
is true, this property governs the size of scroller
buttons. Applied as the width of buttons if the tabBar is horizontal, or the height
if tabBar is vertical. Note that the other dimension is determined by
tabBarThickness
scrollerButtonSize
- scrollerButtonSize Default value is 16
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getScrollerButtonSize()
showTabScroller
is true, this property governs the size of scroller
buttons. Applied as the width of buttons if the tabBar is horizontal, or the height
if tabBar is vertical. Note that the other dimension is determined by
tabBarThickness
public void setPickerButtonSize(int pickerButtonSize) throws java.lang.IllegalStateException
showTabPicker
is true, this property governs the size of tab-picker
button. Applied as the width of buttons if the tabBar is horizontal, or the height
if tabBar is vertical. Note that the other dimension is determined by
tabBarThickness
pickerButtonSize
- pickerButtonSize Default value is 16
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getPickerButtonSize()
showTabPicker
is true, this property governs the size of tab-picker
button. Applied as the width of buttons if the tabBar is horizontal, or the height
if tabBar is vertical. Note that the other dimension is determined by
tabBarThickness
public void setSkinImgDir(java.lang.String skinImgDir) throws java.lang.IllegalStateException
Page.getSkinDir()
.
setSkinImgDir
in class Canvas
skinImgDir
- skinImgDir Default value is "images/TabSet/"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getSkinImgDir()
Page.getSkinDir()
.
getSkinImgDir
in class Canvas
public void setSymmetricScroller(java.lang.Boolean symmetricScroller) throws java.lang.IllegalStateException
showTabScroller
, this property
determines whether the scrollerHSrc
and scrollerVSrc
media
will be used for vertical and horizontal tab-bar scroller buttons, or whether separate
media should be used for each possible tabBarPosition
based
on the scrollerSrc
property for this tabSet.
symmetricScroller
- symmetricScroller Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getSymmetricScroller()
showTabScroller
, this property
determines whether the scrollerHSrc
and scrollerVSrc
media
will be used for vertical and horizontal tab-bar scroller buttons, or whether separate
media should be used for each possible tabBarPosition
based
on the scrollerSrc
property for this tabSet.
public void setScrollerSrc(java.lang.String scrollerSrc) throws java.lang.IllegalStateException
showTabScroller
, and
symmetricScroller
is false, this property governs the base
URL for the tab bar back and forward scroller button images.
Note that if symmetricScroller
is true,
scrollerHSrc
and scrollerVSrc
will be used instead.
To get the path to the image to display, this base URL will be modified as follows:
"Down"
or "Disabled"
will be
appended.tabBarPosition
for this tabSet will be appended."forward"
or "back"
will be appended for the
forward or backward scrolling button."[SKIN]scroll.gif"
, the image
displayed for the back-scroller button on a tabSet with tabBarPosition
set to
"top" and symmetricScroller
set to false would be one of
"[SKIN]scroll_top_back.gif"
, "[SKIN]scroll_Down_top_back.gif"
,
and "[SKIN]scroll_Disabled_top_back.gif"
.
Note that for best results the media should be sized to match the scroller button sizes,
determined by tabBarThickness
and scrollerButtonSize
.
scrollerSrc
- scrollerSrc Default value is "[SKIN]/scroll.gif"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getScrollerSrc()
showTabScroller
, and
symmetricScroller
is false, this property governs the base
URL for the tab bar back and forward scroller button images.
Note that if symmetricScroller
is true,
scrollerHSrc
and scrollerVSrc
will be used instead.
To get the path to the image to display, this base URL will be modified as follows:
"Down"
or "Disabled"
will be
appended.tabBarPosition
for this tabSet will be appended."forward"
or "back"
will be appended for the
forward or backward scrolling button."[SKIN]scroll.gif"
, the image
displayed for the back-scroller button on a tabSet with tabBarPosition
set to
"top" and symmetricScroller
set to false would be one of
"[SKIN]scroll_top_back.gif"
, "[SKIN]scroll_Down_top_back.gif"
,
and "[SKIN]scroll_Disabled_top_back.gif"
.
Note that for best results the media should be sized to match the scroller button sizes,
determined by tabBarThickness
and scrollerButtonSize
.
public void setScrollerHSrc(java.lang.String scrollerHSrc) throws java.lang.IllegalStateException
showTabScroller
, and
symmetricScroller
is true, this property governs the base
URL for the tab bar back and forward scroller button images for horizontal tab bars [IE for
tab sets with tabBarPosition
set to "top" or "bottom"].
Note that if symmetricScroller
is false,
scrollerSrc
will be used instead.
To get the path to the image to display, this base URL will be modified as follows:
"Down"
or "Disabled"
will be
appended."forward"
or "back"
will be appended for the
forward or backward scrolling button."[SKIN]hscroll.gif"
, the image
displayed for the back-scroller button on a tabSet with tabBarPosition
set to
"top" and symmetricScroller
set to true would be one of
"[SKIN]hscroll_back.gif"
, "[SKIN]hscroll_Down_back.gif"
,
and "[SKIN]hscroll_Disabled_back.gif"
.
Note that for best results the media should be sized to match the scroller button sizes,
determined by tabBarThickness
and scrollerButtonSize
.
scrollerHSrc
- scrollerHSrc Default value is "[SKIN]hscroll.gif"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getScrollerHSrc()
showTabScroller
, and
symmetricScroller
is true, this property governs the base
URL for the tab bar back and forward scroller button images for horizontal tab bars [IE for
tab sets with tabBarPosition
set to "top" or "bottom"].
Note that if symmetricScroller
is false,
scrollerSrc
will be used instead.
To get the path to the image to display, this base URL will be modified as follows:
"Down"
or "Disabled"
will be
appended."forward"
or "back"
will be appended for the
forward or backward scrolling button."[SKIN]hscroll.gif"
, the image
displayed for the back-scroller button on a tabSet with tabBarPosition
set to
"top" and symmetricScroller
set to true would be one of
"[SKIN]hscroll_back.gif"
, "[SKIN]hscroll_Down_back.gif"
,
and "[SKIN]hscroll_Disabled_back.gif"
.
Note that for best results the media should be sized to match the scroller button sizes,
determined by tabBarThickness
and scrollerButtonSize
.
public void setScrollerVSrc(java.lang.String scrollerVSrc) throws java.lang.IllegalStateException
showTabScroller
, and
symmetricScroller
is true, this property governs the base
URL for the tab bar back and forward scroller button images for vertical tab bars [IE for
tab sets with tabBarPosition
set to "left" or "right"].
Note that if symmetricScroller
is false,
scrollerSrc
will be used instead.
To get the path to the image to display, this base URL will be modified as follows:
"Down"
or "Disabled"
will be
appended."forward"
or "back"
will be appended for the
forward or backward scrolling button."[SKIN]vscroll.gif"
, the image
displayed for the back-scroller button on a tabSet with tabBarPosition
set to
"left" and symmetricScroller
set to true would be one of
"[SKIN]vscroll_back.gif"
, "[SKIN]vscroll_Down_back.gif"
,
and "[SKIN]vscroll_Disabled_back.gif"
.
Note that for best results the media should be sized to match the scroller button sizes,
determined by tabBarThickness
and scrollerButtonSize
.
scrollerVSrc
- scrollerVSrc Default value is "[SKIN]vscroll.gif"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getScrollerVSrc()
showTabScroller
, and
symmetricScroller
is true, this property governs the base
URL for the tab bar back and forward scroller button images for vertical tab bars [IE for
tab sets with tabBarPosition
set to "left" or "right"].
Note that if symmetricScroller
is false,
scrollerSrc
will be used instead.
To get the path to the image to display, this base URL will be modified as follows:
"Down"
or "Disabled"
will be
appended."forward"
or "back"
will be appended for the
forward or backward scrolling button."[SKIN]vscroll.gif"
, the image
displayed for the back-scroller button on a tabSet with tabBarPosition
set to
"left" and symmetricScroller
set to true would be one of
"[SKIN]vscroll_back.gif"
, "[SKIN]vscroll_Down_back.gif"
,
and "[SKIN]vscroll_Disabled_back.gif"
.
Note that for best results the media should be sized to match the scroller button sizes,
determined by tabBarThickness
and scrollerButtonSize
.
public void setSymmetricPickerButton(java.lang.Boolean symmetricPickerButton) throws java.lang.IllegalStateException
showTabPicker
, this
property determines whether the pickerButtonHSrc
and
pickerButtonVSrc
media will be used for vertical and horizontal tab-bar
picker buttons, or whether separate media should be used for each possible
tabBarPosition
based on the pickerButtonSrc
property for this tabSet.
symmetricPickerButton
- symmetricPickerButton Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getSymmetricPickerButton()
showTabPicker
, this
property determines whether the pickerButtonHSrc
and
pickerButtonVSrc
media will be used for vertical and horizontal tab-bar
picker buttons, or whether separate media should be used for each possible
tabBarPosition
based on the pickerButtonSrc
property for this tabSet.
public void setPickerButtonSrc(java.lang.String pickerButtonSrc) throws java.lang.IllegalStateException
showTabPicker
is true, this property governs the base URL for the picker
button image, when symmetricPickerButton
is set to false
Note that if symmetricPickerButton
is true, the pickerButtonHSrc
and pickerButtonVSrc
properties will be used instead.
To get the path to the image to display, this base URL will be modified as follows:
"Down"
or "Disabled"
will be
appended.tabBarPosition
for this tabSet will be appended.
pickerButtonSrc
- pickerButtonSrc Default value is "[SKIN]/picker.gif"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getPickerButtonSrc()
showTabPicker
is true, this property governs the base URL for the picker
button image, when symmetricPickerButton
is set to false
Note that if symmetricPickerButton
is true, the pickerButtonHSrc
and pickerButtonVSrc
properties will be used instead.
To get the path to the image to display, this base URL will be modified as follows:
"Down"
or "Disabled"
will be
appended.tabBarPosition
for this tabSet will be appended.
public void setPickerButtonHSrc(java.lang.String pickerButtonHSrc) throws java.lang.IllegalStateException
showTabPicker
is true, and symmetricPickerButton
is
set to true, this property governs the base URL for the picker
button image, when displayed in a horizontal tab-bar [IE tabBarPosition
is
set to "top"
or "bottom"
].
Note that if symmetricPickerButton
is false, the pickerButtonSrc
property will be used instead.
This base URL will have a suffix of "Down"
appended when the user holds the
mouse down over the button, and "Disabled"
if the tabset as a whole is
disabled.
pickerButtonHSrc
- pickerButtonHSrc Default value is "[SKIN]hpicker.gif"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getPickerButtonHSrc()
showTabPicker
is true, and symmetricPickerButton
is
set to true, this property governs the base URL for the picker
button image, when displayed in a horizontal tab-bar [IE tabBarPosition
is
set to "top"
or "bottom"
].
Note that if symmetricPickerButton
is false, the pickerButtonSrc
property will be used instead.
This base URL will have a suffix of "Down"
appended when the user holds the
mouse down over the button, and "Disabled"
if the tabset as a whole is
disabled.
public void setPickerButtonVSrc(java.lang.String pickerButtonVSrc) throws java.lang.IllegalStateException
showTabPicker
is true, and symmetricPickerButton
is
set to true, this property governs the base URL for the picker
button image, when displayed in a verricaL tab-bar [IE tabBarPosition
is
set to "LEFT"
or "right"
].
Note that if symmetricPickerButton
is false, the pickerButtonSrc
property will be used instead.
This base URL will have a suffix of "Down"
appended when the user holds the
mouse down over the button, and "Disabled"
if the tabset as a whole is
disabled.
pickerButtonVSrc
- pickerButtonVSrc Default value is "[SKIN]vpicker.gif"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getPickerButtonVSrc()
showTabPicker
is true, and symmetricPickerButton
is
set to true, this property governs the base URL for the picker
button image, when displayed in a verricaL tab-bar [IE tabBarPosition
is
set to "LEFT"
or "right"
].
Note that if symmetricPickerButton
is false, the pickerButtonSrc
property will be used instead.
This base URL will have a suffix of "Down"
appended when the user holds the
mouse down over the button, and "Disabled"
if the tabset as a whole is
disabled.
public void setPaneContainerOverflow(Overflow paneContainerOverflow)
For other values and their meaning, see Overflow
Update paneContainerOverflow
after creation.
Note : This is an advanced setting
paneContainerOverflow
- new overflow setting. Default value is Canvas.AUTOpublic Overflow getPaneContainerOverflow()
For other values and their meaning, see Overflow
public void setSymmetricEdges(java.lang.Boolean symmetricEdges) throws java.lang.IllegalStateException
showPaneContainerEdges
for the paneContainer,
this property determines whether the same edge media will be used regardless of the tab
bar position, or whether different media should be used (necessary if the edge appearance is
not symmetrical on all sides).
If this property is set to false the paneContainer edge image URLs will be prefixed with
the tabBarPosition of the tabSet - for example "[SKIN]edge_top_T.gif"
rather
than just "[SKIN]edge_T.gif"
.
When symmetricEdges
is false, custom edge sizes for the pane container may be
specified via topEdgeSizes
et al, and custom edge offsets via
topEdgeOffsets
et al.
symmetricEdges
- symmetricEdges Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getSymmetricEdges()
showPaneContainerEdges
for the paneContainer,
this property determines whether the same edge media will be used regardless of the tab
bar position, or whether different media should be used (necessary if the edge appearance is
not symmetrical on all sides).
If this property is set to false the paneContainer edge image URLs will be prefixed with
the tabBarPosition of the tabSet - for example "[SKIN]edge_top_T.gif"
rather
than just "[SKIN]edge_T.gif"
.
When symmetricEdges
is false, custom edge sizes for the pane container may be
specified via topEdgeSizes
et al, and custom edge offsets via
topEdgeOffsets
et al.
public void setShowPaneContainerEdges(java.lang.Boolean showPaneContainerEdges)
showEdges
.
Note : This is an advanced setting
showPaneContainerEdges
- showPaneContainerEdges Default value is nullpublic java.lang.Boolean getShowPaneContainerEdges()
showEdges
.
public void setShowPartialEdges(java.lang.Boolean showPartialEdges) throws java.lang.IllegalStateException
showEdges
, setting this
attribute to true
will set the paneContainer to show
customEdges
for the three sides opposing the tabBarPosition.
Note : This is an advanced setting
showPartialEdges
- showPartialEdges Default value is false
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowPartialEdges()
showEdges
, setting this
attribute to true
will set the paneContainer to show
customEdges
for the three sides opposing the tabBarPosition.
public void setDestroyPanes(java.lang.Boolean destroyPanes) throws java.lang.IllegalStateException
BaseWidget.destroy()
should be called on pane
when it a tab is
removed via removeTab(int)
}.
An application might set this to false in order to re-use panes in different tabs or in different parts of the application.
destroyPanes
- destroyPanes Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getDestroyPanes()
BaseWidget.destroy()
should be called on pane
when it a tab is
removed via removeTab(int)
}.
An application might set this to false in order to re-use panes in different tabs or in different parts of the application.
public HandlerRegistration addTabIconClickHandler(TabIconClickHandler handler)
Method fired when the user clicks the icon for a tab, as specified via icon
.
Default behavior will fire icon.click()
if specified, with two parameters
tab
(a pointer to the tab object and tabSet
a pointer to the tabSet
instance.
addTabIconClickHandler
in interface HasTabIconClickHandlers
handler
- the tabIconClick handler
HandlerRegistration
used to remove this handlerpublic void scrollForward()
public void scrollBack()
public int getSelectedTabNumber()
public HandlerRegistration addTabSelectedHandler(TabSelectedHandler handler)
Notification fired when a tab is selected. Note that this will only fire if
this tabSet is drawn. If a tab is selected before TabSet.draw()
is called, the tabSelected()
notificaiton will fire on
draw()
addTabSelectedHandler
in interface HasTabSelectedHandlers
handler
- the tabSelected handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addTabDeselectedHandler(TabDeselectedHandler handler)
Notification fired when a tab is deselected.
addTabDeselectedHandler
in interface HasTabDeselectedHandlers
handler
- the tabDeselected handler
HandlerRegistration
used to remove this handlerpublic void setSelectedTab(int selectedTab)
selectedTab
- selectedTab Default value is 0public void setTabs(Tab... tabs)
public void selectTab(int tabIndex)
tabIndex
- the tab indexpublic void selectTab(java.lang.String ID)
ID
- the tab IDpublic void selectTab(Tab tab)
tab
- the tabpublic void setTabTitle(int tabIndex, java.lang.String title)
tabIndex
- the tab indextitle
- new titlepublic void setTabTitle(java.lang.String ID, java.lang.String title)
ID
- the tab IDtitle
- new titlepublic void setTabTitle(Tab tab, java.lang.String title)
tab
- the tabtitle
- new titlepublic void setTabIcon(int tabIndex, java.lang.String iconURL)
tabIndex
- the tab indexiconURL
- new iconpublic void setTabIcon(java.lang.String ID, java.lang.String iconURL)
ID
- the tab IDiconURL
- new iconpublic void setTabIcon(Tab tab, java.lang.String iconURL)
tab
- the tabiconURL
- new iconpublic void enableTab(int tabIndex)
tabIndex
- the tab indexpublic void enableTab(java.lang.String ID)
ID
- the tab idpublic void enableTab(Tab tab)
tab
- the tabpublic void updateTab(int tabIndex, Canvas pane)
public void updateTab(Tab tab, Canvas pane)
public void disableTab(int tabIndex)
tabIndex
- the tab indexpublic void disableTab(java.lang.String ID)
ID
- the tab idpublic void disableTab(Tab tab)
tab
- the tabpublic void removeTab(int tabIndex)
The pane associated with the removed tab is automatically destroyed when you call this method.
To avoid this, call updateTab(int, com.smartgwt.client.widgets.Canvas)
with null
as the new
pane immediately before removing the tab.
tabs
- list of tabs, tabIDs, or tab numberspublic void removeTab(java.lang.String ID)
The pane associated with the removed tab is automatically destroyed when you call this method.
To avoid this, call updateTab(int, com.smartgwt.client.widgets.Canvas)
with null
as the new
pane immediately before removing the tab.
tabs
- list of tabs, tabIDs, or tab numberspublic void removeTab(Tab tab)
The pane associated with the removed tab is automatically destroyed when you call this method.
To avoid this, call updateTab(int, com.smartgwt.client.widgets.Canvas)
with null
as the new
pane immediately before removing the tab.
tabs
- list of tabs, tabIDs, or tab numberspublic void removeTabs(int[] tabIndexes)
tabs
- list of tabs, tabIDs, or tab numberspublic void removeTabs(java.lang.String[] ids)
tabs
- list of tabs, tabIDs, or tab numberspublic Tab getSelectedTab()
public Tab getTab(int tabIndex)
Note that
live Tab instances are not available until BaseWidget.draw()
.
The returned Tab
is considered an internal component of the TabSet. In order to maximize forward compatibility, manipulate tabs
through APIs such as a setTabTitle(int, java.lang.String)
instead. Also note that a
super-lightweight TabSet implementation may not use a separate Canvas per Tab, and code that accesses an
manipulates Tabs as Canvases won't be compatible with that implementation.
tab
-
public Tab getTab(java.lang.String ID)
Note that
live Tab instances are not available until BaseWidget.draw()
.
The returned Tab
is considered an internal component of the TabSet. In order to maximize forward compatibility, manipulate tabs
through APIs such as a setTabTitle(int, java.lang.String)
instead. Also note that a
super-lightweight TabSet implementation may not use a separate Canvas per Tab, and code that accesses an
manipulates Tabs as Canvases won't be compatible with that implementation.
tab
-
public void addTab(Tab tab)
tab
- new tabpublic int getNumTabs()
the
- number of tabspublic Tab[] getTabs()
public void setTabBarControls(java.lang.Object... tabBarControls) throws java.lang.IllegalStateException
"tabScroller"
and "tabPicker"
. These show the standard
controls to scroll to clipped tabs, or pick them directly from a menu, and show up only if showTabScroller
or showTabPicker
is true and there is not enough space
available to show all the tabs in the tab-bar. Additional controls can be included by adding any widget to this array. Controls will show up in the order in which they are specified. For example, the following code would add a button in the tabBar area, while preserving the normal behavior of the tabScroller and tabPicker:
isc.TabSet.create({ width:300, tabs : [ { title: "Tab one" } ], tabBarControls : [ isc.ImgButton.create({ src:"[SKINIMG]/actions/add.png", width:16, height:16, layoutAlign:"center" }), "tabScroller", "tabPicker" ] });
Note : This is an advanced setting
tabBarControls
- tabBarControls Default value is ["tabScroller", "tabPicker"]
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdTabBarControls
public void setTabPane(int tabIndex, Canvas pane)
pane
to an existing tab in this tabSet
tabIndex
- Tab to updatepane
- new Pane for the tabpublic void setTabPane(java.lang.String tabID, Canvas pane)
pane
to an existing tab in this tabSet
tabID
- Tab to updatepane
- new Pane for the tabpublic HandlerRegistration addCloseClickHandler(CloseClickHandler handler)
When canCloseTabs
is set, this notification method fired when the user clicks
the "close" icon for a tab.
Return false to cancel default behavior of removing the tab from the TabSet
addCloseClickHandler
in interface HasCloseClickHandlers
handler
- the onCloseClick handler
HandlerRegistration
used to remove this handler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |