@Override
	public void mouseClicked(MouseEvent e)
	{
		if (toolBar.isAddingLink() || toolBar.isEditingLink()
		|| toolBar.isRemovingLink())
		{
			int x, y;

			x = ((e.getX() - (lblMap.getWidth() - 32 * map.getWidth()) / 2) / 32);
			y = ((e.getY() - (lblMap.getHeight() - 32 * map.getWidth()) / 2) / 32);

			if (map.getSquare(x, y) != null)
			{
				if (toolBar.isAddingLink())
				{
					addLink(x, y);
				}
				else if (toolBar.isEditingLink())
				{
					editLink(x, y);
				}
				else if (toolBar.isRemovingLink())
				{
					removeLink(x, y);
				}
			}
		}
	}