}  if(_popup == null) {  nv2d.graph.GraphElement geData = p.getNV2DGraphElement(); _popup = _pFactory.getPopup(_parent, new PopupProp(_ctl, geData), e.getX(), e.getY()); _popup.show(); } else { _popup.hide(); nv2d.graph.GraphElement geData = p.getNV2DGraphElement(); _popup = _pFactory.getPopup(_parent, new PopupProp(_ctl, geData), e.getX(), e.getY()); _popup.show();
Point pRenderBox = _parent.getLocationOnScreen(); Point pWindow = _ctl.getWindow().getLocationOnScreen(); _xOffset = (int) (pRenderBox.getX() - pWindow.getX()); _yOffset = (int) (pRenderBox.getY() - pWindow.getX());  if(_popup == null) {  nv2d.graph.GraphElement geData = p.getNV2DGraphElement(); _popup = _pFactory.getPopup(_parent, new PopupProp(_ctl, geData), e.getX() + _xOffset, e.getY() + _yOffset); _popup.show(); } else { _popup.hide(); nv2d.graph.GraphElement geData = p.getNV2DGraphElement(); _popup = _pFactory.getPopup(_parent, new PopupProp(_ctl, geData), e.getX() + _xOffset, e.getY() + _yOffset); _popup.show(); }
		public void itemPressed(VisualItem item, MouseEvent e) {			PElement p = (PElement) item.getEntity();						// first click selects, second click deselects			if(checkMask(e.getModifiers(), MouseEvent.BUTTON1_MASK) && item.getEntity() instanceof PElement) {				p.setSelected(!p.isSelected());			}						if(_popup == null) {				// show popup				nv2d.graph.GraphElement geData = p.getNV2DGraphElement();				_popup = _pFactory.getPopup(_parent, new PopupProp(_ctl, geData), e.getX(), e.getY());				_popup.show();			} else {				_popup.hide();				nv2d.graph.GraphElement geData = p.getNV2DGraphElement();				_popup = _pFactory.getPopup(_parent, new PopupProp(_ctl, geData), e.getX(), e.getY());				_popup.show();			}						_lastItemClicked = item;			maybeShowPopup(e);		}