|
|||||||||
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(JavaScriptObject jsObj)
|
|
Tab(String title)
|
|
Tab(String title,
String icon)
|
Method Summary | |
---|---|
Boolean |
getCanClose()
Determines whether this tab should show an icon allowing the user to dismiss the tab by clicking on it directly. |
String |
getCloseIcon()
Custom src for the close icon for this tab to display if it is closeable. |
Menu |
getContextMenu()
Context menu to show for this object, an instance of the Menu widget. |
Boolean |
getDisabled()
If specified, this tab will initially be rendered in a disabled state. |
String |
getIcon()
If specified, this tab will show an icon next to the tab title. |
String |
getID()
Optional ID for the tab, which can later be used to reference the tab. |
static Tab |
getOrCreateRef(JavaScriptObject jsObj)
|
Canvas |
getPane()
The pane associated with the tab. |
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. |
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(Boolean canClose)
Determines whether this tab should show an icon allowing the user to dismiss the tab by clicking on it directly. |
void |
setCloseIcon(String closeIcon)
Custom src for the close icon for this tab to display if it is closeable. |
void |
setCloseIconSize(int closeIconSize)
Size in pixels of the icon for closing tabs, displayed when canCloseTabs is true. |
void |
setContextMenu(Menu contextMenu)
Context menu to show for this tab. |
void |
setDisabled(boolean disabled)
|
void |
setDisabled(Boolean disabled)
If specified, this tab will initially be rendered in a disabled state. |
void |
setIcon(String icon)
If specified, this tab will show an icon next to the tab title. |
void |
setID(String ID)
Optional ID for the tab, which can later be used to reference the tab. |
void |
setPane(Canvas pane)
Specifies the pane associated with this tab. |
void |
setPaneID(String paneID)
|
void |
setPickerTitle(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(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(JavaScriptObject jsObj)
public Tab(String title)
public Tab(String title, String icon)
Method Detail |
---|
public static Tab getOrCreateRef(JavaScriptObject jsObj)
public void setTitle(String title)
TabSet.setTabTitle(int, java.lang.String)
.
title
- title Default value is nullpublic String getTitle()
TabSet.setTabTitle(int, java.lang.String)
.
public void setPickerTitle(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 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(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 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(Boolean disabled)
TabSet.enableTab(int)
, and TabSet.disableTab(int)
methods.
disabled
- disabled Default value is nullpublic Boolean getDisabled()
TabSet.enableTab(int)
, and TabSet.disableTab(int)
methods.
public void setIcon(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 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(Boolean canClose)
closeTabIcon
by default, but may be overridden by explicitly specifying closeIcon
. If unset, this property is derived from canCloseTabs
canClose
- canClose Default value is nullpublic Boolean getCanClose()
closeTabIcon
by default, but may be overridden by explicitly specifying closeIcon
. If unset, this property is derived from canCloseTabs
public void setCloseIcon(String closeIcon)
canClose
and canCloseTabs
.
closeIcon
- closeIcon Default value is nullpublic String getCloseIcon()
canClose
and canCloseTabs
.
public void setCanClose(boolean canClose)
public void setDisabled(boolean disabled)
public void setPaneID(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 16public void setContextMenu(Menu contextMenu)
contextMenu
- contextMenu Default value is nullpublic Menu getContextMenu()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |