|
|||||||||
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 |
---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
---|
config, configOnly, id, isElementSet, scClassName |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
TabSet()
|
|
TabSet(JavaScriptObject jsObj)
|
Method Summary | |
---|---|
HandlerRegistration |
addCloseClickHandler(CloseClickHandler handler)
Add a onCloseClick handler. |
void |
addTab(Tab tab)
Add a tab |
void |
addTab(Tab tab,
int position)
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 JavaScriptObject |
create()
|
void |
disableTab(int tabIndex)
If the specified tab is enabled, disable it now. |
void |
disableTab(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(String ID)
If the specified tab is disabled, enable it now. |
void |
enableTab(Tab tab)
If the specified tab is disabled, enable it now. |
Boolean |
getAnimateTabScrolling()
If showTabScroller is true, should tabs be scrolled
into view via an animation when the user interacts with the scroller buttons? |
Boolean |
getCanCloseTabs()
Should tabs in this tabSet show an icon allowing the user to dismiss the tab by clicking on it directly. |
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. |
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(JavaScriptObject jsObj)
|
String |
getPaneContainerClassName()
CSS style used for the paneContainer. |
Overflow |
getPaneContainerOverflow()
Specifies the overflow of the pane container (the component that holds the pane contents for all tabs). |
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. |
String |
getPickerButtonSrc()
If showTabPicker is true, this property governs the base
URL for the picker button image, when symmetricPickerButton is set to false |
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. |
String |
getScrollerHSrc()
If this TabSet is showing 'tab scroller buttons' , 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"]. |
String |
getScrollerSrc()
If this TabSet is showing 'tab scroller buttons' , and
'symmetricScroller' is false, this property governs
the base URL for the tab bar back and forward scroller button images. |
String |
getScrollerVSrc()
If this TabSet is showing 'tab scroller buttons' , 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. |
Boolean |
getShowPaneContainerEdges()
Should the paneContainer for this tabset show 'edges' . |
Boolean |
getShowPartialEdges()
If the paneContainer for this tab set is showing 'edges' ,
setting this attribute to true will set the paneContainer to show 'customEdges' for the three sides opposing the tabBarPosition. |
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? |
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? |
String |
getSkinImgDir()
Default directory for skin images (those defined by the class), relative to the Page-wide Page.getSkinDir() . |
Boolean |
getSymmetricEdges()
If this tabSet will 'show edges' 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). |
Boolean |
getSymmetricPickerButton()
If this TabSet is showing a 'tab picker button' , 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. |
Boolean |
getSymmetricScroller()
If this TabSet is showing 'tab scroller buttons' , 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(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 |
static void |
preloadImages()
Preload primary tab skin images. |
void |
removeTab(int tabIndex)
Remove a tab. |
void |
removeTab(String ID)
Remove a tab. |
void |
removeTab(Tab tab)
Remove a tab. |
void |
removeTabs(int[] tabIndexes)
Remove one or more tabs. |
void |
removeTabs(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(String ID)
Select a tab. |
void |
selectTab(Tab tab)
Select a tab. |
void |
setAnimateTabScrolling(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(Boolean canCloseTabs)
Should tabs in this tabSet show an icon allowing the user to dismiss the tab by clicking on it directly. |
void |
setCloseTabIcon(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(Boolean destroyPanes)
Whether BaseWidget.destroy() should be called on pane when it a tab is removed via removeTab(int) }. |
void |
setPaneContainerClassName(String paneContainerClassName)
CSS style used for the paneContainer. |
void |
setPaneContainerOverflow(Overflow paneContainerOverflow)
Specifies the overflow of the pane container (the component that holds the pane contents for all tabs). |
void |
setPickerButtonHSrc(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(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(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(String scrollerHSrc)
If this TabSet is showing 'tab scroller buttons' , 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(String scrollerSrc)
If this TabSet is showing 'tab scroller buttons' , and
'symmetricScroller' is false, this property governs
the base URL for the tab bar back and forward scroller button images. |
void |
setScrollerVSrc(String scrollerVSrc)
If this TabSet is showing 'tab scroller buttons' , 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(Boolean showPaneContainerEdges)
Should the paneContainer for this tabset show 'edges' . |
void |
setShowPartialEdges(Boolean showPartialEdges)
If the paneContainer for this tab set is showing 'edges' ,
setting this attribute to true will set the paneContainer to show 'customEdges' for the three sides opposing the tabBarPosition. |
void |
setShowTabPicker(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(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(String skinImgDir)
Default directory for skin images (those defined by the class), relative to the Page-wide Page.getSkinDir() . |
void |
setSymmetricEdges(Boolean symmetricEdges)
If this tabSet will 'show edges' 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(Boolean symmetricPickerButton)
If this TabSet is showing a 'tab picker button' , 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(Boolean symmetricScroller)
If this TabSet is showing 'tab scroller buttons' , 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(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,
String iconURL)
Changes the icon of a tab |
void |
setTabIcon(String ID,
String iconURL)
Changes the icon of a tab |
void |
setTabIcon(Tab tab,
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(String tabID,
Canvas pane)
Apply a new pane to an existing tab in this tabSet |
void |
setTabs(Tab... tabs)
|
void |
setTabTitle(int tabIndex,
String title)
Changes the title of a tab |
void |
setTabTitle(String ID,
String title)
Changes the title of a tab |
void |
setTabTitle(Tab tab,
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 |
---|
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
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, 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 |
Constructor Detail |
---|
public TabSet()
public TabSet(JavaScriptObject jsObj)
Method Detail |
---|
public static TabSet getOrCreateRef(JavaScriptObject jsObj)
protected JavaScriptObject create()
create
in class Canvas
public void setTabBarPosition(Side tabBarPosition) throws IllegalStateException
tabBarPosition
- tabBarPosition Default value is Canvas.TOP
IllegalStateException
- this property cannot be changed after the component has been createdpublic Side getTabBarPosition()
public void setTabBarAlign(Side tabBarAlign) throws 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
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(Boolean canCloseTabs)
canClose
.
The URL for this icon's image will be derived from closeTabIcon
by
default, but may be overridden by
explicitly specifying closeIcon
.
Note:
Currently, tabs can only show a single icon, so a closable tab will show
the close icon only even if icon
is set. To work around this, add the icon
as an HTML <img>
tag to the title
property, for example:
title :
"" + isc.Canvas.imgHTML("myIcon.png") + " Tab Title"
canCloseTabs
- canCloseTabs Default value is nullpublic Boolean getCanCloseTabs()
canClose
.
The URL for this icon's image will be derived from closeTabIcon
by
default, but may be overridden by
explicitly specifying closeIcon
.
Note:
Currently, tabs can only show a single icon, so a closable tab will show
the close icon only even if icon
is set. To work around this, add the icon
as an HTML <img>
tag to the title
property, for example:
title :
"" + isc.Canvas.imgHTML("myIcon.png") + " Tab Title"
public void setCloseTabIcon(String closeTabIcon) throws IllegalStateException
canCloseTabs
is true.
closeTabIcon
- closeTabIcon Default value is [SKIN]/TabSet/close.png
IllegalStateException
- this property cannot be changed after the component has been createdpublic String getCloseTabIcon()
canCloseTabs
is true.
public void setCloseTabIconSize(int closeTabIconSize) throws IllegalStateException
canCloseTabs
is true.
closeTabIconSize
- closeTabIconSize Default value is 16
IllegalStateException
- this property cannot be changed after the component has been createdpublic int getCloseTabIconSize()
canCloseTabs
is true.
public void setShowTabScroller(Boolean showTabScroller) throws IllegalStateException
showTabScroller
- showTabScroller Default value is true
IllegalStateException
- this property cannot be changed after the component has been createdpublic Boolean getShowTabScroller()
public void setShowTabPicker(Boolean showTabPicker) throws IllegalStateException
showTabPicker
- showTabPicker Default value is true
IllegalStateException
- this property cannot be changed after the component has been createdpublic Boolean getShowTabPicker()
public void setAnimateTabScrolling(Boolean animateTabScrolling) throws 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
IllegalStateException
- this property cannot be changed after the component has been createdpublic 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 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 'this.tabBarThickness'
scrollerButtonSize
- scrollerButtonSize Default value is 16
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 'this.tabBarThickness'
public void setPickerButtonSize(int pickerButtonSize) throws 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 'this.tabBarThickness'
pickerButtonSize
- pickerButtonSize Default value is 16
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 'this.tabBarThickness'
public void setSkinImgDir(String skinImgDir) throws IllegalStateException
Page.getSkinDir()
.
setSkinImgDir
in class Canvas
skinImgDir
- skinImgDir Default value is "images/TabSet/"
IllegalStateException
- this property cannot be changed after the component has been createdpublic String getSkinImgDir()
Page.getSkinDir()
.
getSkinImgDir
in class Canvas
public void setSymmetricScroller(Boolean symmetricScroller) throws IllegalStateException
'tab scroller buttons'
, 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
IllegalStateException
- this property cannot be changed after the component has been createdpublic Boolean getSymmetricScroller()
'tab scroller buttons'
, 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(String scrollerSrc) throws IllegalStateException
'tab scroller buttons'
, 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"
IllegalStateException
- this property cannot be changed after the component has been createdpublic String getScrollerSrc()
'tab scroller buttons'
, 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(String scrollerHSrc) throws IllegalStateException
'tab scroller buttons'
, 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"
IllegalStateException
- this property cannot be changed after the component has been createdpublic String getScrollerHSrc()
'tab scroller buttons'
, 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(String scrollerVSrc) throws IllegalStateException
'tab scroller buttons'
, 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"
IllegalStateException
- this property cannot be changed after the component has been createdpublic String getScrollerVSrc()
'tab scroller buttons'
, 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(Boolean symmetricPickerButton) throws IllegalStateException
'tab picker button'
, 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
IllegalStateException
- this property cannot be changed after the component has been createdpublic Boolean getSymmetricPickerButton()
'tab picker button'
, 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(String pickerButtonSrc) throws 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"
IllegalStateException
- this property cannot be changed after the component has been createdpublic 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(String pickerButtonHSrc) throws 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"
IllegalStateException
- this property cannot be changed after the component has been createdpublic 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(String pickerButtonVSrc) throws 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"
IllegalStateException
- this property cannot be changed after the component has been createdpublic 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 setPaneContainerClassName(String paneContainerClassName)
paneContainerClassName
- paneContainerClassName Default value is nullpublic String getPaneContainerClassName()
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(Boolean symmetricEdges) throws IllegalStateException
'show edges'
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
IllegalStateException
- this property cannot be changed after the component has been createdpublic Boolean getSymmetricEdges()
'show edges'
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(Boolean showPaneContainerEdges)
'edges'
.
Note : This is an advanced setting
showPaneContainerEdges
- showPaneContainerEdges Default value is nullpublic Boolean getShowPaneContainerEdges()
'edges'
.
public void setShowPartialEdges(Boolean showPartialEdges) throws IllegalStateException
'edges'
,
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
IllegalStateException
- this property cannot be changed after the component has been createdpublic Boolean getShowPartialEdges()
'edges'
,
setting this attribute to true
will set the paneContainer to show 'customEdges'
for the three sides opposing the tabBarPosition.
public void setDestroyPanes(Boolean destroyPanes) throws 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
IllegalStateException
- this property cannot be changed after the component has been createdpublic 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()
notification 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(String ID)
ID
- the tab IDpublic void selectTab(Tab tab)
tab
- the tabpublic void setTabTitle(int tabIndex, String title)
tabIndex
- the tab indextitle
- new titlepublic void setTabTitle(String ID, String title)
ID
- the tab IDtitle
- new titlepublic void setTabTitle(Tab tab, String title)
tab
- the tabtitle
- new titlepublic void setTabIcon(int tabIndex, String iconURL)
tabIndex
- the tab indexiconURL
- new iconpublic void setTabIcon(String ID, String iconURL)
ID
- the tab IDiconURL
- new iconpublic void setTabIcon(Tab tab, String iconURL)
tab
- the tabiconURL
- new iconpublic void enableTab(int tabIndex)
tabIndex
- the tab indexpublic void enableTab(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(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(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(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(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 void addTab(Tab tab, int position)
tab
- new tabposition
- the position where tab should be addedpublic int getNumTabs()
public Tab[] getTabs()
public void setTabBarControls(Object... tabBarControls) throws 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"]
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(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 handlerpublic static void preloadImages()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |