/** * 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"); } }
/** * Get the selected records for the tab. * * @param layerId layer to get selected items for * @return selected records */ @Api public ListGridRecord[] getSelection(String layerId) { String id = tabset.getID() + "_" + constructIdSaveLayerId(layerId); FeatureListGridTab tab = (FeatureListGridTab) tabset.getTab(id); if (tab != null) { return tab.getSelection(); } return null; }
/** * 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"); } }
private void removeTab(VectorLayer layer) { String id = tabset.getID() + "_" + constructIdSaveLayerId(layer.getId()); if (tabset.getTab(id) != null) { tabset.removeTab(id); setEmpty(); } }
private FeatureListGridTab getOrCreateTab(VectorLayer layer) { String idSaveLayerId = constructIdSaveLayerId(layer.getId()); String id = tabset.getID() + "_" + idSaveLayerId; FeatureListGridTab t = (FeatureListGridTab) tabset.getTab(id); if (t == null) { t = new FeatureListGridTab(map, layer, isShowCsvExportAction()); t.setID(id); for (ExtraButton button : extraButtons) { if (idSaveLayerId.equals(button.getIdSaveLayerId())) { t.addButton(button.getButton(), button.getPosition()); } } } return t; }