} else if (tabs.containsKey(tabComponent)) { Tab tab = tabs.get(tabComponent); tab.setCaption(caption); tab.setIcon(icon); return tab;
private static void switchCaption(TabSheet tabSheet, MessageSourceAccessor messageSourceAccessor) { int j=0; for (final Iterator<Component> i = tabSheet.getComponentIterator(); i.hasNext();) { final Component component = i.next(); Tab tab = tabSheet.getTab(j++); String newCaption = getTranslatedCaption(tab.getCaption(),messageSourceAccessor); if (newCaption != null) { tab.setCaption(newCaption); } } } private static void switchCaption(Label label, MessageSourceAccessor messageSourceAccessor)
tab.setCaption(DesignAttributeHandler.readAttribute("caption", attr, String.class));
public void moveTab(Component c, int position) { Tab oldTab = getTab(c); String tabId = tabIds.inverse().get(oldTab); String tabCubaId = getCubaId(oldTab); // do not detach close handler // call super super.removeComponent(oldTab.getComponent()); Tab newTab = addTab(c, position); newTab.setCaption(oldTab.getCaption()); newTab.setDescription(oldTab.getDescription()); newTab.setClosable(oldTab.isClosable()); newTab.setEnabled(oldTab.isEnabled()); newTab.setVisible(oldTab.isVisible()); newTab.setIcon(oldTab.getIcon()); newTab.setStyleName(oldTab.getStyleName()); setCubaId(newTab, tabCubaId); if (tabId != null) { tabIds.remove(tabId); tabIds.put(tabId, newTab); } }
public void setSwatchesTabCaption(String caption) { ((TabSheet) swatchesTab.getParent()).getTab(swatchesTab).setCaption(caption); }
@Override public void setCaption(String caption) { tabbarTab.setCaption(caption); }
@Override public TabBuilder<C> caption(Localizable caption) { ObjectUtils.argumentNotNull(caption, "Localizable must be not null"); tab.setCaption(LocalizationContext.translate(caption, true)); return this; }
@Override public void setTabCaption(String tabId, String caption) { getTabNN(tabId).setCaption(caption); }
@Override public void setCaption(String caption) { getVaadinTab().setCaption(caption); }
@Override public void setCaption(String caption) { getVaadinTab().setCaption(caption); }
public void textChange(FieldEvents.TextChangeEvent textChangeEvent) { AbstractTextField source = (AbstractTextField) textChangeEvent.getSource(); source.setValue(textChangeEvent.getText()); if (source.isValid()) { m_tab.setCaption(textChangeEvent.getText()); m_wallboard.setTitle(textChangeEvent.getText()); WallboardProvider.getInstance().save(); ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Title"); } } });
/** * Copies properties from one Tab to another. * * @param from * The tab whose data to copy. * @param to * The tab to which copy the data. */ private static void copyTabMetadata(Tab from, Tab to) { to.setCaption(from.getCaption()); to.setIcon(from.getIcon(), from.getIconAlternateText()); to.setDescription(from.getDescription()); to.setVisible(from.isVisible()); to.setEnabled(from.isEnabled()); to.setClosable(from.isClosable()); to.setStyleName(from.getStyleName()); to.setComponentError(from.getComponentError()); }