diff options
author | Artur Signell <artur@vaadin.com> | 2012-08-13 19:13:24 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-08-13 19:18:50 +0300 |
commit | acf099b41fe1f983d416e598b5b49eaea9f35c66 (patch) | |
tree | da664e675e639a074b6d8abde3af4d7a7b52055a /server/src/com/vaadin/ui/MenuBar.java | |
parent | e85d933b25cc3c5cc85eb7eb4b13b950fd8e1569 (diff) | |
download | vaadin-framework-acf099b41fe1f983d416e598b5b49eaea9f35c66.tar.gz vaadin-framework-acf099b41fe1f983d416e598b5b49eaea9f35c66.zip |
Eliminated dependencies from server to client (#9279)
Diffstat (limited to 'server/src/com/vaadin/ui/MenuBar.java')
-rw-r--r-- | server/src/com/vaadin/ui/MenuBar.java | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/server/src/com/vaadin/ui/MenuBar.java b/server/src/com/vaadin/ui/MenuBar.java index 5b5dc13e20..abf71858ae 100644 --- a/server/src/com/vaadin/ui/MenuBar.java +++ b/server/src/com/vaadin/ui/MenuBar.java @@ -10,11 +10,11 @@ import java.util.List; import java.util.Map; import java.util.Stack; +import com.vaadin.shared.ui.menubar.MenuBarConstants; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Resource; import com.vaadin.terminal.Vaadin6Component; -import com.vaadin.terminal.gwt.client.ui.menubar.VMenuBar; /** * <p> @@ -41,10 +41,11 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component { /** Paint (serialise) the component for the client. */ @Override public void paintContent(PaintTarget target) throws PaintException { - target.addAttribute(VMenuBar.OPEN_ROOT_MENU_ON_HOWER, openRootOnHover); + target.addAttribute(MenuBarConstants.OPEN_ROOT_MENU_ON_HOWER, + openRootOnHover); if (isHtmlContentAllowed()) { - target.addAttribute(VMenuBar.HTML_CONTENT_ALLOWED, true); + target.addAttribute(MenuBarConstants.HTML_CONTENT_ALLOWED, true); } target.startTag("options"); @@ -80,7 +81,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component { target.addAttribute("id", item.getId()); if (item.getStyleName() != null) { - target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_STYLE, + target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_STYLE, item.getStyleName()); } @@ -96,22 +97,24 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component { Resource icon = item.getIcon(); if (icon != null) { - target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_ICON, icon); + target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_ICON, icon); } if (!item.isEnabled()) { - target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_DISABLED, true); + target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DISABLED, + true); } String description = item.getDescription(); if (description != null && description.length() > 0) { - target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_DESCRIPTION, + target.addAttribute( + MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION, description); } if (item.isCheckable()) { // if the "checked" attribute is present (either true or false), // the item is checkable - target.addAttribute(VMenuBar.ATTRIBUTE_CHECKED, + target.addAttribute(MenuBarConstants.ATTRIBUTE_CHECKED, item.isChecked()); } if (item.hasChildren()) { |