_ctl.getView().addComponent(new ColorLegendUI(map.getLegend(name)), "Legend", ViewInterface.SIDE_PANEL); _viewLegendMenuActionPerformed(e);
_viewLegendMenuActionPerformed(e, colorLegendUI);
	public void setLegendMenu(final LegendMap map) {		// grab set of names/attributes		// alphabetize		// make menuitem for each name/attribute		// add listener which grabs legend		_legend.removeAll();		_legend.add(_legendDefaultColoring);		_legend.add(new JSeparator());		Object [] items = map.datumSet().toArray();		java.util.Arrays.sort(items);		for(int j = 0; j < items.length; j++) {			final String name = ((nv2d.graph.Datum) items[j]).name();			JMenuItem item = new JMenuItem(name);			item.setToolTipText("Color vertices according to " + name);			_legend.add(item);			item.addActionListener(new ActionListener() {				public void actionPerformed(ActionEvent e) {					map.getLegend(name).assignColors();					_ctl.getView().addComponent(new ColorLegendUI(map.getLegend(name)), "Legend", ViewInterface.SIDE_PANEL);					_viewLegendMenuActionPerformed(e);				}			});		}	}