From b4850f1877113f5894afcb96439e0d6f833c149c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Risto=20Yrj=C3=A4n=C3=A4?= Date: Fri, 8 Aug 2008 09:10:42 +0000 Subject: [PATCH] cleanup svn changeset:5158/svn branch:trunk --- .../terminal/gwt/client/ui/IMenuBar.java | 21 ++++++------------- 1 file 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("

"); + if (moreItemUIDL.hasAttribute("icon")) { itemHTML.append(""); } itemHTML.append(moreItemUIDL.getStringAttribute("text")); - // itemHTML.append("

"); + 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("

"); - if (item.hasAttribute("icon")) { itemHTML.append(""); } - // itemHTML.append("

"); - 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(); -- 2.39.5