diff options
author | Risto Yrjänä <risto.yrjana@itmill.com> | 2008-08-08 09:10:42 +0000 |
---|---|---|
committer | Risto Yrjänä <risto.yrjana@itmill.com> | 2008-08-08 09:10:42 +0000 |
commit | b4850f1877113f5894afcb96439e0d6f833c149c (patch) | |
tree | 81381a773ccf5d4d52ae866564a56eed047ff35a /src | |
parent | b5f9e160c55cc525690b6c88ff0da680073b5a8e (diff) | |
download | vaadin-framework-b4850f1877113f5894afcb96439e0d6f833c149c.tar.gz vaadin-framework-b4850f1877113f5894afcb96439e0d6f833c149c.zip |
cleanup
svn changeset:5158/svn branch:trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/com/itmill/toolkit/terminal/gwt/client/ui/IMenuBar.java | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IMenuBar.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IMenuBar.java index c5412b3b09..a1f8d9f621 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IMenuBar.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IMenuBar.java @@ -106,10 +106,6 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { } UIDL options = uidl.getChildUIDL(0); - // For GWT 1.5 - //this.setAnimationEnabled(options.getBooleanAttribute("animationEnabled" - // )) - // ; if (options.hasAttribute("submenuIcon")) { submenuIcon = client.translateToolkitUri(uidl.getChildUIDL(0) @@ -123,7 +119,7 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { if (collapseItems) { UIDL moreItemUIDL = options.getChildUIDL(0); StringBuffer itemHTML = new StringBuffer(); - // itemHTML.append("<p>"); + if (moreItemUIDL.hasAttribute("icon")) { itemHTML.append("<img src=\"" + client.translateToolkitUri(moreItemUIDL @@ -131,7 +127,7 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { + "\" align=\"left\" />"); } itemHTML.append(moreItemUIDL.getStringAttribute("text")); - // itemHTML.append("</p>"); + moreItem = new CustomMenuItem(itemHTML.toString(), emptyCommand); } @@ -153,8 +149,6 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { // Construct html from the text and the optional icon StringBuffer itemHTML = new StringBuffer(); - // itemHTML.append("<p>"); - if (item.hasAttribute("icon")) { itemHTML.append("<img src=\"" + client.translateToolkitUri(item @@ -170,8 +164,6 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { + "\" align=\"right\" />"); } - // itemHTML.append("</p>"); - Command cmd = null; // Check if we need to create a command to this item @@ -371,13 +363,13 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { break; case Event.ONMOUSEOVER: - // System.err.println("ONMOUSEOVER"); + itemOver(targetItem); break; case Event.ONMOUSEOUT: - // System.err.println("ONMOUSEOUT"); + itemOut(targetItem); break; } @@ -452,8 +444,7 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { popup = new ToolkitOverlay(true, false, true); popup.setWidget(item.getSubMenu()); popup.addPopupListener(this); - // System.err.println("Popup created " + number); - // popup.setTitle(String.valueOf(number++)); + if (subMenu) { popup.setPopupPosition(item.getParentMenu().getAbsoluteLeft() + item.getParentMenu().getOffsetWidth(), item @@ -568,7 +559,7 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { * Listener method, fired when this menu is closed */ public void onPopupClosed(PopupPanel sender, boolean autoClosed) { - // System.err.println("Popup hide " + sender.getTitle()); + hideChildren(); if (autoClosed) { hideParents(); |