public void mousePressed(MouseEvent e) {

		// Set popup menu for right click here.

		if (e.getModifiers() == InputEvent.BUTTON3_MASK) {

			boolean ena = controller.isOn(lblNodeName.getText());
			for (int i = 2; i < GuiNodePopMenu.getSubElements().length; i++) {
				((JMenuItem) GuiNodePopMenu.getSubElements()[i])
				.setEnabled(ena);
			}
			updateConnectedLinkMenu();
			GuiNodePopMenu.show(e.getComponent(), e.getX(), e.getY());
		}
		else if (e.getModifiers() == InputEvent.BUTTON1_MASK) {
			pressedX = e.getX();
			pressedY = e.getY();
		}

	}