1 18 19 package org.objectweb.jac.aspects.gui; 20 21 import java.util.HashMap ; 22 import java.util.List ; 23 import java.util.Vector ; 24 25 public class Menu { 26 27 public static final String TOP = "TOP"; 28 29 public static final String BOTTOM = "BOTTOM"; 30 31 public static final String LEFT = "LEFT"; 32 33 public static final String RIGHT = "RIGHT"; 34 35 HashMap map = new HashMap (); 37 Vector keys = new Vector (); 39 String icon; 41 42 44 public void setIcon(String icon) { 45 this.icon = icon; 46 } 47 49 public String getIcon() { 50 return icon; 51 } 52 String position = null; 53 55 public String getPosition() { 56 return position; 57 } 58 60 public void setPosition(String position) { 61 this.position = position; 62 } 63 65 public Object get(String key) { 66 return map.get(key); 67 } 68 70 public void put(String key, Object value) { 71 if (!map.containsKey(key)) 72 keys.add(key); 73 map.put(key,value); 74 } 75 77 public List getKeys() { 78 return keys; 79 } 80 82 public boolean containsKey(String key) { 83 return map.containsKey(key); 84 } 85 87 public void addSeparator() { 88 keys.add(null); 89 } 90 92 public int size() { 93 return keys.size(); 94 } 95 } 96 | Popular Tags |