private void createActions() {

		boolean mac = OS.startsWith("Mac");

		insertAtomContainerAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				insertModel(AtomContainer.getCompatibleName());
			}
		};
		insertAtomContainerAction.putValue(Action.NAME, INSERT_ATOM_CONTAINER);
		insertAtomContainerAction.putValue(Action.SHORT_DESCRIPTION, "Insert " + INSERT_ATOM_CONTAINER);
		insertAtomContainerAction.putValue(Action.SMALL_ICON, new ImageIcon(Page.class.getResource("images/MolecularModel.gif")));

		insertGBContainerAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				insertModel(GBContainer.getCompatibleName());
			}
		};
		insertGBContainerAction.putValue(Action.NAME, INSERT_GB_CONTAINER);
		insertGBContainerAction.putValue(Action.SHORT_DESCRIPTION, "Insert " + INSERT_GB_CONTAINER);
		insertGBContainerAction.putValue(Action.SMALL_ICON, new ImageIcon(getClass().getResource("images/GBModel.gif")));

		insertChemContainerAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				insertModel(ChemContainer.getCompatibleName());
			}
		};
		insertChemContainerAction.putValue(Action.NAME, INSERT_CHEM_CONTAINER);
		insertChemContainerAction.putValue(Action.SHORT_DESCRIPTION, "Insert " + INSERT_CHEM_CONTAINER);
		insertChemContainerAction.putValue(Action.SMALL_ICON, new ImageIcon(getClass().getResource("images/ChemReaction.gif")));

		insertProsynContainerAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				insertProteinSynthesisModel();
			}
		};
		insertProsynContainerAction.putValue(Action.NAME, INSERT_PROSYN_CONTAINER);
		insertProsynContainerAction.putValue(Action.SHORT_DESCRIPTION, "Insert " + INSERT_PROSYN_CONTAINER);
		insertProsynContainerAction.putValue(Action.SMALL_ICON, new ImageIcon(getClass().getResource("images/Prosyn.gif")));

		insertFileAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				importFile();
			}
		};
		insertFileAction.putValue(Action.NAME, "File");
		insertFileAction.putValue(Action.SHORT_DESCRIPTION, "Insert a file");

		newAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				askToCreateNewPage();
				inputTitle();
			}
		};
		newAction.putValue(Action.NAME, "New Blank Page");
		newAction.putValue(Action.SHORT_DESCRIPTION, "Create a new blank page");
		newAction.putValue(Action.ACCELERATOR_KEY, mac ? KeyStroke.getKeyStroke(KeyEvent.VK_N, KeyEvent.META_MASK, true) : KeyStroke.getKeyStroke(KeyEvent.VK_N, KeyEvent.CTRL_MASK, true));

		closeAction = new DefaultAction() {
			public void actionPerformed(ActionEvent e) {
				if (ModelerUtilities.stopFiring(e))
					return;
				notifyPageListeners(new PageEvent(Page.this, PageEvent.CLOSE_CURRENT_WINDOW));
			}
		};
		closeAction.putValue(Action.NAME, CLOSE_PAGE);
		closeAction.putValue(Action.SHORT_DESCRIPTION, "Close this page");
		closeAction.putValue(Action.ACCELERATOR_KEY, mac ? KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.META_MASK) : KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.CTRL_MASK));

		openAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				openPage();
			}
		};
		openAction.putValue(Action.NAME, OPEN_PAGE);
		openAction.putValue(Action.SHORT_DESCRIPTION, "Open a page");
		openAction.putValue(Action.ACCELERATOR_KEY, mac ? KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.META_MASK, true) : KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK, true));

		saveAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				savePage(false, null);
			}
		};
		saveAction.putValue(Action.NAME, SAVE_PAGE);
		saveAction.putValue(Action.SHORT_DESCRIPTION, "Save this page");
		saveAction.putValue(Action.ACCELERATOR_KEY, mac ? KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.META_MASK, true) : KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK, true));

		saveAsAction = new DefaultAction() {
			public void actionPerformed(ActionEvent e) {
				savePage(true, null);
			}
		};
		saveAsAction.putValue(Action.NAME, SAVE_PAGE_AS);
		saveAsAction.putValue(Action.SHORT_DESCRIPTION, "Save this page as");
		saveAsAction.putValue(Action.ACCELERATOR_KEY, mac ? KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.META_MASK | KeyEvent.SHIFT_MASK, true) : KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK, true));

		saveAsAppletAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				saveAsApplet();
			}
		};
		saveAsAppletAction.putValue(Action.NAME, SAVE_PAGE_AS_APPLET);
		saveAsAppletAction.putValue(Action.SHORT_DESCRIPTION, "Save as an applet");

		colorBarAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				if (colorBarDialog == null)
					colorBarDialog = new ColorBarDialog(Page.this);
				LineIcon lineIcon = new LineIcon(Page.this);
				colorBarDialog.setColorBar(lineIcon);
				colorBarDialog.setVisible(true);
				if (colorBarDialog.getOption() == JOptionPane.CANCEL_OPTION)
					return;
				insertWrappedIcon(lineIcon);
			}
		};
		colorBarAction.putValue(Action.NAME, "Color Bar");
		colorBarAction.putValue(Action.SHORT_DESCRIPTION, "Insert a color bar");

		insertComponentAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				Object source = e.getSource();
				if (source instanceof AbstractButton) {
					importComponent(((AbstractButton) source).getName());
				}
			}
		};
		insertComponentAction.putValue(Action.NAME, INSERT_COMPONENT);

		printPreviewAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				AbstractButton ab = (AbstractButton) e.getSource();
				ab.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
				setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
				if (printPreview == null)
					printPreview = new PrintPreview(Page.this);
				printPreview.showPreviewScreen();
				ab.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
				setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
			}
		};
		printPreviewAction.putValue(Action.NAME, "Preview");
		printPreviewAction.putValue(Action.SHORT_DESCRIPTION, "Preview this page before printing");

		pageSetupAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				AbstractButton ab = (AbstractButton) e.getSource();
				ab.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
				setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
				PrintPreview.invokePageFormatDialog();
				ab.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
				setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
			}
		};
		pageSetupAction.putValue(Action.NAME, "Page Setup");
		pageSetupAction.putValue(Action.SHORT_DESCRIPTION, "Set up printing format");
		pageSetupAction.putValue(Action.ACCELERATOR_KEY, mac ? KeyStroke.getKeyStroke(KeyEvent.VK_P, KeyEvent.META_MASK | KeyEvent.SHIFT_MASK, true) : KeyStroke.getKeyStroke(KeyEvent.VK_P, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK, true));

		printAction = new DefaultAction() {
			public void actionPerformed(ActionEvent e) {
				AbstractButton ab = (AbstractButton) e.getSource();
				ab.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
				setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
				if (printPreview == null)
					printPreview = new PrintPreview(Page.this);
				printPreview.print();
				ab.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
				setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
			}
		};
		printAction.putValue(Action.NAME, "Print");
		printAction.putValue(Action.SHORT_DESCRIPTION, "Print this page");
		printAction.putValue(Action.ACCELERATOR_KEY, mac ? KeyStroke.getKeyStroke(KeyEvent.VK_P, KeyEvent.META_MASK, true) : KeyStroke.getKeyStroke(KeyEvent.VK_P, KeyEvent.CTRL_MASK, true));

		selectAllAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				requestFocusInWindow();
				selectAll();
				highlightEmbedded();
			}
		};
		selectAllAction.putValue(Action.NAME, DefaultEditorKit.selectAllAction);
		selectAllAction.putValue(Action.SHORT_DESCRIPTION, DefaultEditorKit.selectAllAction);
		selectAllAction.putValue(Action.ACCELERATOR_KEY, mac ? KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.META_MASK) : KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.CTRL_MASK));

		symbolAction = new DefaultAction() {
			public void actionPerformed(ActionEvent e) {
				if (symbolDialog == null)
					symbolDialog = new SymbolDialog(Page.this);
				symbolDialog.setVisible(true);
			}
		};
		symbolAction.putValue(Action.NAME, "Symbol (Unicode Only)");
		symbolAction.putValue(Action.SHORT_DESCRIPTION, "Insert a symbol");

		hyperlinkAction = new DefaultAction() {
			public void actionPerformed(ActionEvent e) {
				if (hyperlinkDialog == null)
					hyperlinkDialog = new HyperlinkDialog(Page.this);
				hyperlinkDialog.setCurrentValues();
				hyperlinkDialog.setVisible(true);
			}
		};
		hyperlinkAction.putValue(Action.NAME, "Hyperlink");
		hyperlinkAction.putValue(Action.SHORT_DESCRIPTION, "Add a hyperlink to the selected area");
		hyperlinkAction.putValue(Action.SMALL_ICON, new ImageIcon(getClass().getResource("images/hyperlink.png")));
		hyperlinkAction.putValue(Action.ACCELERATOR_KEY, mac ? KeyStroke.getKeyStroke(KeyEvent.VK_K, KeyEvent.META_MASK, true) : KeyStroke.getKeyStroke(KeyEvent.VK_K, KeyEvent.CTRL_MASK, true));

		fontAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				if (fontDialog == null)
					fontDialog = new FontDialog(Page.this);
				AttributeSet a = ((DefaultStyledDocument) Page.this.getDocument()).getCharacterElement(getCaretPosition() - 1).getAttributes();
				fontDialog.setAttributes(a);
				fontDialog.setVisible(true);
				if (fontDialog.getOption() == JOptionPane.OK_OPTION) {
					setCharacterAttributes(fontDialog.getAttributes(), false);
					saveReminder.setChanged(true);
					notifyPageListeners(new PageEvent(Page.this, PageEvent.FONT_CHANGED));
				}
			}
		};
		fontAction.putValue(Action.NAME, "Font");
		fontAction.putValue(Action.SHORT_DESCRIPTION, "Font");
		fontAction.putValue(Action.SMALL_ICON, new ImageIcon(getClass().getResource("images/Font.gif")));
		fontAction.putValue(Action.ACCELERATOR_KEY, mac ? KeyStroke.getKeyStroke(KeyEvent.VK_F, KeyEvent.META_MASK | KeyEvent.SHIFT_MASK, true) : KeyStroke.getKeyStroke(KeyEvent.VK_F, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK, true));

		paragraphAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				if (paragraphDialog == null)
					paragraphDialog = new ParagraphDialog(Page.this);
				AttributeSet a = ((DefaultStyledDocument) getDocument()).getParagraphElement(Page.this.getCaretPosition()).getAttributes();
				paragraphDialog.setAttributes(a);
				paragraphDialog.setVisible(true);
				if (paragraphDialog.getOption() == JOptionPane.OK_OPTION) {
					setParagraphAttributes(paragraphDialog.getAttributes(), false);
					saveReminder.setChanged(true);
				}
			}
		};
		paragraphAction.putValue(Action.NAME, "Paragraph");
		paragraphAction.putValue(Action.SHORT_DESCRIPTION, "Change paragraph");
		paragraphAction.putValue(Action.SMALL_ICON, new ImageIcon(getClass().getResource("images/Paragraph.gif")));
		paragraphAction.putValue(Action.ACCELERATOR_KEY, mac ? KeyStroke.getKeyStroke(KeyEvent.VK_G, KeyEvent.META_MASK | KeyEvent.SHIFT_MASK, true) : KeyStroke.getKeyStroke(KeyEvent.VK_G, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK, true));

		insertBulletAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				if (bulletDialog == null)
					bulletDialog = new BulletDialog(Page.this);
				bulletDialog.setBulletType(getBulletType());
				bulletDialog.setVisible(true);
			}
		};
		insertBulletAction.putValue(Action.NAME, "Bullet");
		insertBulletAction.putValue(Action.SHORT_DESCRIPTION, "Insert Bullet");
		insertBulletAction.putValue(Action.SMALL_ICON, new ImageIcon(getClass().getResource("images/Bullet.gif")));
		insertBulletAction.putValue(Action.ACCELERATOR_KEY, mac ? KeyStroke.getKeyStroke(KeyEvent.VK_B, KeyEvent.META_MASK | KeyEvent.SHIFT_MASK, true) : KeyStroke.getKeyStroke(KeyEvent.VK_B, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK, true));

		propertiesAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				new SwingWorker("Page:propertiesAction") {
					public Object construct() {
						return getLastModifiedAndContentLength();
					}

					public void finished() {
						long[] info = (long[]) getValue();
						if (info == null)
							return;
						if (info[0] > 0L)
							properties.put("Last modified", new Date(info[0]));
						if (info[1] > 0L)
							properties.put("Size", new Long(info[1]));
						if (propertiesDialog == null)
							propertiesDialog = new PagePropertiesDialog(Page.this);
						propertiesDialog.setCurrentValues();
						propertiesDialog.pack();
						propertiesDialog.setVisible(true);
					}
				}.start();
			}
		};
		propertiesAction.putValue(Action.NAME, SET_PROPERTIES);
		propertiesAction.putValue(Action.SHORT_DESCRIPTION, "Set properties of this page");
		propertiesAction.putValue(Action.SMALL_ICON, IconPool.getIcon("properties"));

		pastePlainTextAction = new AbstractAction() {
			public void actionPerformed(ActionEvent e) {
				Page.super.paste();
			}
		};
		pastePlainTextAction.putValue(Action.NAME, "Paste Plain Text");
		pastePlainTextAction.putValue(Action.SHORT_DESCRIPTION, "Paste Plain Text");

	}