@Override public void mouseClicked(MouseEvent e) { if(popup.isShowing()) { popup.setVisible(false); } else { displayOverflow(); } }
public static boolean isPopupContained(JPopupMenu popup) { if (!popup.isShowing()) { return false; } return willPopupBeContained(popup, popup.getLocationOnScreen()); }
private static boolean willPopupBeContained(JPopupMenu popup, Point origin) { if (!popup.isShowing()) { return false; } Window w = SwingUtilities.windowForComponent(popup.getInvoker()); Rectangle r = new Rectangle(origin, popup.getSize()); return (w != null) && w.getBounds().contains(r); }
/** * Returns true if the auto-completion popup window is visible. */ protected boolean isPopupListShowing() { return popup.isShowing(); }
public boolean isCompletionPopupShowing() { return _completionPopup != null && _completionPopup.isShowing(); }
public boolean isContextMenuShowing() { return _contextMenu != null && _contextMenu.isShowing(); }
if (!popup.isShowing()) { return;
public static void dynamicChange(final JPopupMenu popup, boolean usedToBeContained) { if (!popup.isShowing()) { return;
/** * Returns true if there is a selected item at the auto-completion popup window. */ protected boolean isItemSelectedAtPopupList() { return popup.isShowing() && list.getSelectedIndex() >= 0; }
@Override public void eventDispatched(AWTEvent event) { MouseEvent e = (MouseEvent) event; if(isVisible() && !isShowing() && popup.isShowing()) { popup.setVisible(false); return; if (popup.isShowing() && e.getID() == MouseEvent.MOUSE_EXITED) { int minX = popup.getLocationOnScreen().x; int maxX = popup.getLocationOnScreen().x + popup.getWidth(); if (popup.isShowing() && overflowButton.isShowing() && (e.getID() == MouseEvent.MOUSE_MOVED || e.getID() == MouseEvent.MOUSE_EXITED)) { int minX = overflowButton.getLocationOnScreen().x; int maxX_ob = minX + overflowButton.getWidth();
public boolean isIntellisensePopupShowing() { return (_beanInfoPopup != null && _beanInfoPopup.isShowing()) || (_valuePopup != null && _valuePopup.isShowing()); }
public static boolean isPopupContained(JPopupMenu popup) { if (!popup.isShowing()) { return false; } return willPopupBeContained(popup, popup.getLocationOnScreen()); }
@Override public void mouseClicked(MouseEvent e) { if (popup.isShowing()) { hidePopup(); } else { showPopup(); } }
public static boolean isPopupContained(JPopupMenu popup) { if (!popup.isShowing()) { return false; } return willPopupBeContained(popup, popup.getLocationOnScreen()); }
@Override public void mouseExited(final MouseEvent e) { mouseOverThis = false; if (jPopupMenu.isShowing()) { getModel().setRollover(true); } }
private static boolean willPopupBeContained(JPopupMenu popup, Point origin) { if (!popup.isShowing()) { return false; } Window w = SwingUtilities.windowForComponent (popup.getInvoker()); Rectangle r = new Rectangle (origin, popup.getSize ()); return w != null && w.getBounds ().contains (r); }
private static boolean willPopupBeContained(JPopupMenu popup, Point origin) { if (!popup.isShowing()) { return false; } Window w = SwingUtilities.windowForComponent (popup.getInvoker()); Rectangle r = new Rectangle (origin, popup.getSize ()); return w != null && w.getBounds ().contains (r); }
protected void togglePopup(java.awt.event.MouseEvent evt) { if (popupMenu != null && popupMenu.isShowing() || popupBecameInvisible >= evt.getWhen()) { popupMenu.setVisible(false); } else { showPopup(evt); } }
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { if (popupMenuUI.screenImage != null) { JPopupMenu popup = (JPopupMenu) e.getSource(); JRootPane root = popup.getRootPane(); if (popup.isShowing() && root.isShowing()) { Point ptPopup = popup.getLocationOnScreen(); Point ptRoot = root.getLocationOnScreen(); Graphics g = popup.getRootPane().getGraphics(); g.drawImage(popupMenuUI.screenImage, ptPopup.x - ptRoot.x, ptPopup.y - ptRoot.y, null); popupMenuUI.resetScreenImage(); } } }