@Override
	public void actionPerformed(ActionEvent e)
	{
		if (e.getSource() == btnAddLink)
		{
			if (addingLink)
			{
				linkAdded();
			}
			else
			{
				addingLink = true;
				btnAddLink.setSelected(true);
				btnEditLink.setSelected(false);
				btnRemoveLink.setSelected(false);
				((MapEditor) getParent()).setMapCursor(Cursor.CROSSHAIR_CURSOR);
			}
		}
		else if (e.getSource() == btnEditLink)
		{
			if (editingLink)
			{
				linkEdited();
			}
			else
			{
				editingLink = true;
				btnEditLink.setSelected(true);
				btnAddLink.setSelected(false);
				btnRemoveLink.setSelected(false);
				((MapEditor) getParent()).setMapCursor(Cursor.CROSSHAIR_CURSOR);
			}
		}
		else if (e.getSource() == btnRemoveLink)
		{
			if (removingLink)
			{
				linkRemoved();
			}
			else
			{
				removingLink = true;
				btnRemoveLink.setSelected(true);
				btnAddLink.setSelected(false);
				btnEditLink.setSelected(false);
				((MapEditor) getParent()).setMapCursor(Cursor.CROSSHAIR_CURSOR);
			}
		}
	}