private void showPopupWindow(MouseEvent event, JComponent component) {
		MenuSelectionManager menuManager = MenuSelectionManager.defaultManager();
		if (menuManager.getSelectedPath().length != 0) {
			return;
		}

		Window parentWindow = popupSource.getPopupParent();
		popupWindow = new PopupWindow(parentWindow, component);

		popupWindow.addComponentListener(new ComponentAdapter() {
			@Override
			public void componentShown(ComponentEvent e) {
				popupShown();
			}

			@Override
			public void componentHidden(ComponentEvent e) {
				popupHidden();
			}
		});

		popupWindow.showPopup(event);
	}
Sets the enablement of this class's popup
@param visible true to have popups enabled
Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/popup/PopupRegulator.java