public void createPopupMenu() {

		if (popupMenu != null)
			return;

		if (graph.getPopupMenu() == null) {
			popupMenu = new JPopupMenu();
		}
		else {
			popupMenu = graph.getPopupMenu();
			popupMenu.addSeparator();
		}
		popupMenu.setInvoker(this);

		String s = Modeler.getInternationalText("TakeSnapshot");
		JMenuItem mi = new JMenuItem((s != null ? s : "Take a Snapshot") + "...");
		mi.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				SnapshotGallery.sharedInstance().takeSnapshot(page.getAddress(), graph);
			}
		});
		popupMenu.add(mi);
		popupMenu.addSeparator();

		s = Modeler.getInternationalText("CustomizeFunctionGraph");
		final JMenuItem miCustom = new JMenuItem((s != null ? s : "Customize This Function Graph") + "...");
		miCustom.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (maker == null) {
					maker = new PageFunctionGraphMaker(PageFunctionGraph.this);
				}
				else {
					maker.setObject(PageFunctionGraph.this);
				}
				maker.invoke(page);
			}
		});
		popupMenu.add(miCustom);

		s = Modeler.getInternationalText("RemoveFunctionGraph");
		final JMenuItem miRemove = new JMenuItem(s != null ? s : "Remove This Function Graph");
		miRemove.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				page.removeComponent(PageFunctionGraph.this);
			}
		});
		popupMenu.add(miRemove);

		s = Modeler.getInternationalText("CopyFunctionGraph");
		mi = new JMenuItem(s != null ? s : "Copy This Function Graph");
		mi.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				page.copyComponent(PageFunctionGraph.this);
			}
		});
		popupMenu.add(mi);

		popupMenu.pack();

		popupMenu.addPopupMenuListener(new PopupMenuListener() {
			public void popupMenuCanceled(PopupMenuEvent e) {
			}

			public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
				miCustom.setEnabled(isChangable());
				miRemove.setEnabled(isChangable());
			}

			public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
			}
		});

	}