private JMenu createViewMenu() {

		String s = getInternationalText("View");
		JMenu menu = new JMenu(s != null ? s : "View");

		s = getInternationalText("NavigationMode");
		final JMenuItem miNavigation = new JCheckBoxMenuItem(s != null ? s : "Navigation Mode", new ImageIcon(MolecularContainer.class.getResource("resources/Immersive.gif")));
		miNavigation.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent e) {
				view.getViewer().setNavigationMode(e.getStateChange() == ItemEvent.SELECTED);
				if (view.getViewer().getNavigationMode()) {
					if (!view.getViewer().getPerspectiveDepth()) {
						JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(MolecularContainer.this), "Perspective depth is required for the navigation mode. It will be turned on.");
						view.getViewer().setPerspectiveDepth(true);
					}
				}
				else {
					view.setCameraAtom(-1);
				}
				view.repaint();
			}
		});
		menu.add(miNavigation);

		s = getInternationalText("DetachCameraFromMovingObject");
		final JMenuItem miDetach = new JMenuItem(s != null ? s : "Detach Camera from Moving Object", new ImageIcon(MolecularContainer.class.getResource("resources/DetachCamera.gif")));
		miDetach.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				view.setCameraAtom(-1);
				// view.getViewer().homePosition();
				view.refresh();
			}
		});
		menu.add(miDetach);

		s = getInternationalText("ZDepthMagnification");
		final JMenu zDepthMenu = new JMenu(s != null ? s : "Z-Depth Magnification");
		zDepthMenu.setIcon(new ImageIcon(MolecularContainer.class.getResource("resources/ZDepth.gif")));
		menu.add(zDepthMenu);
		menu.addSeparator();

		ButtonGroup bg = new ButtonGroup();

		final JMenuItem miOne = new JRadioButtonMenuItem("1x");
		miOne.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent e) {
				if (e.getStateChange() == ItemEvent.SELECTED) {
					view.getViewer().setZDepthMagnification(1);
					view.repaint();
				}
			}
		});
		zDepthMenu.add(miOne);
		bg.add(miOne);

		final JMenuItem miFive = new JRadioButtonMenuItem("5x");
		miFive.setSelected(true);
		miFive.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent e) {
				if (e.getStateChange() == ItemEvent.SELECTED) {
					view.getViewer().setZDepthMagnification(5);
					view.repaint();
				}
			}
		});
		zDepthMenu.add(miFive);
		bg.add(miFive);

		final JMenuItem miTen = new JRadioButtonMenuItem("10x");
		miTen.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent e) {
				if (e.getStateChange() == ItemEvent.SELECTED) {
					view.getViewer().setZDepthMagnification(10);
					view.repaint();
				}
			}
		});
		zDepthMenu.add(miTen);
		bg.add(miTen);

		s = getInternationalText("Spin");
		final JMenuItem miSpin = new JCheckBoxMenuItem(s != null ? s : "Spin", IconPool.getIcon("spin"));
		miSpin.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent e) {
				view.setSpinOn(e.getStateChange() == ItemEvent.SELECTED);
			}
		});
		menu.add(miSpin);

		s = getInternationalText("ShowGlassSimulationBox");
		final JMenuItem miGlassBox = new JCheckBoxMenuItem(s != null ? s : "Show Glass Simulation Box", new ImageIcon(MolecularContainer.class.getResource("resources/GlassBox.gif")));
		miGlassBox.setSelected(true);
		miGlassBox.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent e) {
				view.setShowGlassSimulationBox(e.getStateChange() == ItemEvent.SELECTED);
			}
		});
		menu.add(miGlassBox);

		s = getInternationalText("FitGlassSimulationBoxIntoWindow");
		JMenuItem mi = new JMenuItem(s != null ? s : "Fit Glass Simulation Box Into Window");
		mi.setIcon(new ImageIcon(MolecularContainer.class.getResource("resources/FitIntoWindow.gif")));
		mi.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				view.fitIntoWindow();
				boxRotated = true;
			}
		});
		menu.add(mi);

		s = getInternationalText("ShowAllAtoms");
		mi = new JMenuItem(s != null ? s : "Show All Atoms", new ImageIcon(MolecularContainer.class.getResource("resources/ShowAllAtoms.gif")));
		mi.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				view.showAllAtoms();
			}
		});
		menu.add(mi);

		s = getInternationalText("ClearMeasurements");
		mi = new JMenuItem(s != null ? s : "Clear Measurements");
		mi.setIcon(IconPool.getIcon("erase"));
		mi.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				view.getViewer().clearMeasurements();
			}
		});
		menu.add(mi);

		menu.addMenuListener(new MenuListener() {
			public void menuSelected(MenuEvent e) {
				miDetach.setEnabled(view.getCameraAtom() >= 0);
				ModelerUtilities.setWithoutNotifyingListeners(miGlassBox, view.getShowGlassSimulationBox());
				ModelerUtilities.setWithoutNotifyingListeners(miSpin, view.isSpinOn());
				boolean b = view.getViewer().getNavigationMode();
				ModelerUtilities.setWithoutNotifyingListeners(miNavigation, b);
				zDepthMenu.setEnabled(b);
				if (b) {
					switch (view.getViewer().getZDepthMagnification()) {
					case 1:
						ModelerUtilities.setWithoutNotifyingListeners(miOne, true);
						break;
					case 5:
						ModelerUtilities.setWithoutNotifyingListeners(miFive, true);
						break;
					case 10:
						ModelerUtilities.setWithoutNotifyingListeners(miTen, true);
						break;
					}
				}
			}

			public void menuCanceled(MenuEvent e) {
			}

			public void menuDeselected(MenuEvent e) {
			}
		});

		return menu;

	}