{ JMenu menu = new JMenu("Controls"); JMenuItem menuItem = new JMenuItem("Rendering", im.getIcon(IconManager.RENDER)); control.attachItemListener(menuItem, ViewerCtrl.RENDERING); menu.add(menuItem); menuItem = new JMenuItem("Inspector", im.getIcon(IconManager.INSPECTOR)); control.attachItemListener(menuItem, ViewerCtrl.INSPECTOR); menu.add(menuItem); viewer3DItem = new JMenuItem("3D view", im.getIcon(IconManager.VIEWER3D)); control.attachItemListener(viewer3DItem, ViewerCtrl.VIEWER3D); viewer3DItem.setEnabled(maxZ != 0); menu.add(viewer3DItem);
{ JMenu menu = new JMenu("Controls"); JMenuItem menuItem = new JMenuItem("Rendering", im.getIcon(IconManager.RENDER)); control.attachItemListener(menuItem, ViewerCtrl.RENDERING); menu.add(menuItem); menuItem = new JMenuItem("ROI", im.getIcon(IconManager.ROI)); control.attachItemListener(menuItem, ViewerCtrl.ROI); menu.add(menuItem); menuItem = new JMenuItem("Inspector", im.getIcon(IconManager.INSPECTOR)); control.attachItemListener(menuItem, ViewerCtrl.INSPECTOR); menu.add(menuItem); viewer3DItem = new JMenuItem("3D view", im.getIcon(IconManager.VIEWER3D)); control.attachItemListener(viewer3DItem, ViewerCtrl.VIEWER3D); viewer3DItem.setEnabled(maxZ != 0); menu.add(viewer3DItem);
	private JMenu createControlsMenu(int maxZ, int maxT)	{		JMenu menu = new JMenu("Controls");		JMenuItem menuItem = new JMenuItem("Rendering", 										im.getIcon(IconManager.RENDER));		control.attachItemListener(menuItem, ViewerCtrl.RENDERING);		menu.add(menuItem);		menuItem = new JMenuItem("Inspector", 									im.getIcon(IconManager.INSPECTOR));		control.attachItemListener(menuItem, ViewerCtrl.INSPECTOR);		menu.add(menuItem);		viewer3DItem = new JMenuItem("3D view", 						im.getIcon(IconManager.VIEWER3D));		control.attachItemListener(viewer3DItem, ViewerCtrl.VIEWER3D);		viewer3DItem.setEnabled(maxZ != 0);		menu.add(viewer3DItem);        movieItem = new JMenuItem("Movie", im.getIcon(IconManager.MOVIE));        control.attachItemListener(menuItem, ViewerCtrl.MOVIE);		menu.add(movieItem);		menuItem = new JMenuItem("SAVE AS...", im.getIcon(IconManager.SAVEAS));		control.attachItemListener(menuItem, ViewerCtrl.SAVE_AS);		menu.add(menuItem);                if (maxT == 0 && maxZ == 0) movieItem.setEnabled(false);		return menu;	}