diff options
Diffstat (limited to 'server/src/com/vaadin/ui/TabSheet.java')
-rw-r--r-- | server/src/com/vaadin/ui/TabSheet.java | 81 |
1 files changed, 3 insertions, 78 deletions
diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java index 5a1aa02845..868d97a09c 100644 --- a/server/src/com/vaadin/ui/TabSheet.java +++ b/server/src/com/vaadin/ui/TabSheet.java @@ -361,8 +361,9 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, String caption = null; Resource icon = null; if (TabSheet.class.isAssignableFrom(source.getClass())) { - caption = ((TabSheet) source).getTabCaption(c); - icon = ((TabSheet) source).getTabIcon(c); + Tab tab = ((TabSheet) source).getTab(c); + caption = tab.getCaption(); + icon = tab.getIcon(); } source.removeComponent(c); addTab(c, caption, icon); @@ -478,82 +479,6 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, } /** - * Gets tab caption. The tab is identified by the tab content component. - * - * @param c - * the component in the tab - * @deprecated Use {@link #getTab(Component)} and {@link Tab#getCaption()} - * instead. - */ - @Deprecated - public String getTabCaption(Component c) { - Tab info = tabs.get(c); - if (info == null) { - return ""; - } else { - return info.getCaption(); - } - } - - /** - * Sets tab caption. The tab is identified by the tab content component. - * - * @param c - * the component in the tab - * @param caption - * the caption to set. - * @deprecated Use {@link #getTab(Component)} and - * {@link Tab#setCaption(String)} instead. - */ - @Deprecated - public void setTabCaption(Component c, String caption) { - Tab info = tabs.get(c); - if (info != null) { - info.setCaption(caption); - requestRepaint(); - } - } - - /** - * Gets the icon for a tab. The tab is identified by the tab content - * component. - * - * @param c - * the component in the tab - * @deprecated Use {@link #getTab(Component)} and {@link Tab#getIcon()} - * instead. - */ - @Deprecated - public Resource getTabIcon(Component c) { - Tab info = tabs.get(c); - if (info == null) { - return null; - } else { - return info.getIcon(); - } - } - - /** - * Sets icon for the given component. The tab is identified by the tab - * content component. - * - * @param c - * the component in the tab - * @param icon - * the icon to set - * @deprecated Use {@link #getTab(Component)} and - * {@link Tab#setIcon(Resource)} instead. - */ - @Deprecated - public void setTabIcon(Component c, Resource icon) { - Tab info = tabs.get(c); - if (info != null) { - info.setIcon(icon); - requestRepaint(); - } - } - - /** * Returns the {@link Tab} (metadata) for a component. The {@link Tab} * object can be used for setting caption,icon, etc for the tab. * |