}
UIDL options = uidl.getChildUIDL(0);
- // For GWT 1.5
- //this.setAnimationEnabled(options.getBooleanAttribute("animationEnabled"
- // ))
- // ;
if (options.hasAttribute("submenuIcon")) {
submenuIcon = client.translateToolkitUri(uidl.getChildUIDL(0)
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
+ "\" align=\"left\" />");
}
itemHTML.append(moreItemUIDL.getStringAttribute("text"));
- // itemHTML.append("</p>");
+
moreItem = new CustomMenuItem(itemHTML.toString(), emptyCommand);
}
// 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
+ "\" align=\"right\" />");
}
- // itemHTML.append("</p>");
-
Command cmd = null;
// Check if we need to create a command to this item
break;
case Event.ONMOUSEOVER:
- // System.err.println("ONMOUSEOVER");
+
itemOver(targetItem);
break;
case Event.ONMOUSEOUT:
- // System.err.println("ONMOUSEOUT");
+
itemOut(targetItem);
break;
}
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
* 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();