public void show(Popupable object, JComponent component, int x, int y) { setLabel(object.getLabel()); if (getComponentCount()>0) removeAll();
public void show(Object object, JComponent component, int x, int y) {  setLabel(""); Vector items = new Vector();  if (object instanceof Popupable) { items = ((Popupable)object).getItems(); setLabel(((Popupable)object).getLabel()); if (items==null) items = new Vector(); }
public void show(Popupable object, JComponent component, int x, int y) {	setLabel(object.getLabel());	if (getComponentCount()>0) removeAll();	// add object items	Vector items = object.getItems();	if ((items==null) || (items.size()==0)) return;			Object obj;	Enumeration e = items.elements();	while (e.hasMoreElements())	{		obj = e.nextElement();		if (obj instanceof JMenuItem)			add((JMenuItem)obj);		else if (obj instanceof JSeparator)			add((JSeparator)obj);	}	addPluginItems(this, object);	// show popup menu	show(component, x, y);}