/** * If specified, this tab will initially be rendered in a disabled state. * * @param disabled disabled Default value is null */ public void setDisabled(boolean disabled) { if(tabSet == null || !tabSet.isDrawn()) { setAttribute("disabled", disabled); } else { if(disabled) { tabSet.disableTab(getID()); } else { tabSet.enableTab(getID()); } } }
/** * If specified, this tab will show an icon next to the tab title. Note that as with {@link * com.smartgwt.client.widgets.Button#getIcon icon}, the URL of a tabs icon will be updated to reflect disabled state.<br> * If desired a click handler may be assigned to the icon, which will be fired when the user clicks the tab. This method * takes a single parameter <code>tab</code>, a pointer to the tab object. * * @param icon icon Default value is null * @see <a href="http://www.smartclient.com/smartgwt/showcase/#layout_tabs_orientation" target="examples">Orientation Example</a> */ public void setIcon(String icon) { if(tabSet == null || !tabSet.isDrawn()) { setAttribute("icon", icon); } else { tabSet.setTabIcon(getID(), icon); } }
/** * Specifies the title of the this tab. * * @return String */ public String getTitle() { if(tabSet == null || !tabSet.isDrawn()) { return getAttributeAsString("title"); } else { return tabSet.getTab(getID()).getAttributeAsString("title"); } }
/** * If specified, this tab will initially be rendered in a disabled state. To enable or disable tabs on the fly use the * {@link com.smartgwt.client.widgets.tab.TabSet#enableTab TabSet.enableTab}, and {@link * com.smartgwt.client.widgets.tab.TabSet#disableTab TabSet.disableTab} methods. * * * @return Boolean */ public Boolean getDisabled() { if(tabSet == null || !tabSet.isDrawn()) { return getAttributeAsBoolean("disabled"); } else { return tabSet.getTab(getID()).getAttributeAsBoolean("disabled"); } }
/** * If specified, this tab will show an icon next to the tab title. Note that as with {@link * com.smartgwt.client.widgets.Button#getIcon icon}, the URL of a tabs icon will be updated to reflect disabled state.<br> * If desired a click handler may be assigned to the icon, which will be fired when the user clicks the tab. This method * takes a single parameter <code>tab</code>, a pointer to the tab object. * * * @return String * @see <a href="http://www.smartclient.com/smartgwt/showcase/#layout_tabs_orientation" target="examples">Orientation Example</a> */ public String getIcon() { if(tabSet == null || !tabSet.isDrawn()) { return getAttributeAsString("icon"); } else { return tabSet.getTab(getID()).getAttributeAsString("icon"); } }