|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.core.RefDataClass
com.smartgwt.client.widgets.tab.Tab
public class Tab
Tabs are specified as objects, not class instances. For example, when developing in JavaScript, a typical initialization block for a TabSet would look like this:
TabSet.create({ tabs: [ {title: "tab1", pane: "pane1"}, {title: "tab2"} ] });And in XML:
<TabSet> <tabs> <Tab title="tab1" pane="pane1"/> <Tab title="tab2"/> </tabs> </TabSet>
Field Summary |
---|
Fields inherited from class com.smartgwt.client.core.JsObject |
---|
jsObj |
Constructor Summary | |
---|---|
Tab()
|
|
Tab(com.google.gwt.core.client.JavaScriptObject jsObj)
|
|
Tab(java.lang.String title)
|
|
Tab(java.lang.String title,
java.lang.String icon)
|
Method Summary | |
---|---|
java.lang.Boolean |
getCanClose()
Determines whether this tab should show an icon allowing the user to dismiss the tab by clicking on it directly. |
java.lang.String |
getCloseIcon()
Custom src for the close icon for this tab to display if it is closeable. See canClose and canCloseTabs . |
java.lang.Boolean |
getDisabled()
If specified, this tab will initially be rendered in a disabled state. |
java.lang.String |
getIcon()
If specified, this tab will show an icon next to the tab title. |
java.lang.String |
getID()
Optional ID for the tab, which can later be used to reference the tab. APIs requiring a referenct a tab will accept the tabs ID [including TabSet.selectTab(int) , TabSet.updateTab(int, com.smartgwt.client.widgets.Canvas) , TabSet.removeTab(int) ].The ID will also be passed to the TabSet.addTabSelectedHandler(com.smartgwt.client.widgets.tab.events.TabSelectedHandler) and TabSet.addTabDeselectedHandler(com.smartgwt.client.widgets.tab.events.TabDeselectedHandler)
handler functions, if specified.
|
static Tab |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Canvas |
getPane()
The pane associated with the tab. |
java.lang.String |
getPickerTitle()
If showTabPicker is true for this TabSet, if set this property will determine
the title of the picker menu item for this tab. |
java.lang.String |
getTitle()
Specifies the title of the this tab. |
int |
getWidth()
You can specify an explicit width for the tab using this property. |
void |
setCanClose(boolean canClose)
|
void |
setCanClose(java.lang.Boolean canClose)
Determines whether this tab should show an icon allowing the user to dismiss the tab by clicking on it directly. |
void |
setCloseIcon(java.lang.String closeIcon)
Custom src for the close icon for this tab to display if it is closeable. See canClose and canCloseTabs . |
void |
setCloseIconSize(int closeIconSize)
Size in pixels of the icon for closing tabs, displayed when canCloseTabs is true. |
void |
setDisabled(boolean disabled)
|
void |
setDisabled(java.lang.Boolean disabled)
If specified, this tab will initially be rendered in a disabled state. |
void |
setIcon(java.lang.String icon)
If specified, this tab will show an icon next to the tab title. |
void |
setID(java.lang.String ID)
Optional ID for the tab, which can later be used to reference the tab. APIs requiring a referenct a tab will accept the tabs ID [including TabSet.selectTab(int) , TabSet.updateTab(int, com.smartgwt.client.widgets.Canvas) , TabSet.removeTab(int) ].The ID will also be passed to the TabSet.addTabSelectedHandler(com.smartgwt.client.widgets.tab.events.TabSelectedHandler) and TabSet.addTabDeselectedHandler(com.smartgwt.client.widgets.tab.events.TabDeselectedHandler)
handler functions, if specified.
|
void |
setPane(Canvas pane)
Specifies the pane associated with this tab. |
void |
setPaneID(java.lang.String paneID)
|
void |
setPickerTitle(java.lang.String pickerTitle)
If showTabPicker is true for this TabSet, if set this property will determine
the title of the picker menu item for this tab. |
void |
setTitle(java.lang.String title)
Specifies the title of the this tab. |
void |
setWidth(int width)
You can specify an explicit width for the tab using this property. |
Methods inherited from class com.smartgwt.client.core.RefDataClass |
---|
getRef, getRef |
Methods inherited from class com.smartgwt.client.core.JsObject |
---|
isCreated, setJsObj |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tab()
public Tab(com.google.gwt.core.client.JavaScriptObject jsObj)
public Tab(java.lang.String title)
public Tab(java.lang.String title, java.lang.String icon)
Method Detail |
---|
public static Tab getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public void setTitle(java.lang.String title)
TabSet.setTabTitle(int, java.lang.String)
.
title
- title Default value is nullpublic java.lang.String getTitle()
TabSet.setTabTitle(int, java.lang.String)
.
public void setPickerTitle(java.lang.String pickerTitle)
showTabPicker
is true for this TabSet, if set this property will determine
the title of the picker menu item for this tab. If unset, title
will be used
instead
pickerTitle
- pickerTitle Default value is nullpublic java.lang.String getPickerTitle()
showTabPicker
is true for this TabSet, if set this property will determine
the title of the picker menu item for this tab. If unset, title
will be used
instead
public void setID(java.lang.String ID)
TabSet.selectTab(int)
, TabSet.updateTab(int, com.smartgwt.client.widgets.Canvas)
, TabSet.removeTab(int)
].TabSet.addTabSelectedHandler(com.smartgwt.client.widgets.tab.events.TabSelectedHandler)
and TabSet.addTabDeselectedHandler(com.smartgwt.client.widgets.tab.events.TabDeselectedHandler)
handler functions, if specified.
Note that if you provide an ID, it must be globally unique.
ID
- ID Default value is nullpublic java.lang.String getID()
TabSet.selectTab(int)
, TabSet.updateTab(int, com.smartgwt.client.widgets.Canvas)
, TabSet.removeTab(int)
].TabSet.addTabSelectedHandler(com.smartgwt.client.widgets.tab.events.TabSelectedHandler)
and TabSet.addTabDeselectedHandler(com.smartgwt.client.widgets.tab.events.TabDeselectedHandler)
handler functions, if specified.
Note that if you provide an ID, it must be globally unique.
public void setWidth(int width)
width
- width Default value is 100public int getWidth()
public void setDisabled(java.lang.Boolean disabled)
TabSet.enableTab(int)
, and TabSet.disableTab(int)
methods.
disabled
- disabled Default value is nullpublic java.lang.Boolean getDisabled()
TabSet.enableTab(int)
, and TabSet.disableTab(int)
methods.
public void setIcon(java.lang.String icon)
icon
, the URL of a tabs icon will be updated to reflect disabled state.tab
, a pointer to the tab
object.
icon
- icon Default value is nullpublic java.lang.String getIcon()
icon
, the URL of a tabs icon will be updated to reflect disabled state.tab
, a pointer to the tab
object.
public void setCanClose(java.lang.Boolean canClose)
closeTabIcon
by default, but may be overridden by explicitly specifying
closeIcon
.canCloseTabs
canClose
- canClose Default value is nullpublic java.lang.Boolean getCanClose()
closeTabIcon
by default, but may be overridden by explicitly specifying
closeIcon
.canCloseTabs
public void setCloseIcon(java.lang.String closeIcon)
canClose
and canCloseTabs
.
closeIcon
- closeIcon Default value is nullpublic java.lang.String getCloseIcon()
canClose
and canCloseTabs
.
public void setCanClose(boolean canClose)
public void setDisabled(boolean disabled)
public void setPaneID(java.lang.String paneID)
public void setPane(Canvas pane)
TabSet.updateTab(int, com.smartgwt.client.widgets.Canvas)
pane
- the tab panepublic Canvas getPane()
public void setCloseIconSize(int closeIconSize)
canCloseTabs
is true.
closeIconSize
- closeIconSize Default value is 16
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |