1 package org.splat.wapp;
6 public class PopupMenu extends ContextualMenu {
8 // ==============================================================================================================================
10 // ==============================================================================================================================
13 // -------------------
14 width = 186; // Includes borders (2px) and shadow (4px)
15 height = 2; // Top and bottom border
18 // ==============================================================================================================================
20 // ==============================================================================================================================
22 public void addItem (String name, PopupItem item) {
23 // -------------------------------------------------
25 item.height = 22; // Height of image.selected.png background image
26 this.height += item.height;
27 super.addItem(name, item);
30 public void addSeparator () {
31 // ---------------------------
32 PopupItem item = new PopupItem();
35 this.height += item.height;
36 super.addItem("", item);
39 @SuppressWarnings({"rawtypes","unchecked"})
40 public List<PopupItem> asList () {
41 // --------------------------------
45 public PopupItem item (String name) {
46 // -----------------------------------
47 return (PopupItem)items.get(indices.get(name));