private void initBar() {
		ButtonGroup group = new ButtonGroup();
		JToggleButton button = null;
		Iterator it = tools.iterator();
		KeyStroke key;
		while (it.hasNext()) {
			Tool tool = (Tool) it.next();
			button = new JToggleButton(tool.getIcon());
			buttonsToTools.put(button, tool);
			button.setToolTipText(tool.getShortcutToolTip());
			group.add(button);
			this.add(button);
			button.addActionListener(this);
			key = tool.getKey();
			if (key == null)
				continue;
			InputMap imap = button
					.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
			ActionMap amap = button.getActionMap();
			Object o = new Object();
			imap.put(key, o);
			amap.put(o, new ButtonClicker(button));
		}
	}