本文整理了Java中javax.swing.JPopupMenu.isShowing()
方法的一些代码示例,展示了JPopupMenu.isShowing()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPopupMenu.isShowing()
方法的具体详情如下:
包路径:javax.swing.JPopupMenu
类名称:JPopupMenu
方法名:isShowing
暂无
代码示例来源:origin: org.netbeans.api/org-openide-awt
@Override
public void mouseClicked(MouseEvent e) {
if(popup.isShowing()) {
popup.setVisible(false);
} else {
displayOverflow();
}
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
public static boolean isPopupContained(JPopupMenu popup) {
if (!popup.isShowing()) {
return false;
}
return willPopupBeContained(popup, popup.getLocationOnScreen());
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
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);
}
代码示例来源:origin: mucommander/mucommander
/**
* Returns true if the auto-completion popup window is visible.
*/
protected boolean isPopupListShowing() {
return popup.isShowing();
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-lab
public boolean isCompletionPopupShowing()
{
return _completionPopup != null && _completionPopup.isShowing();
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-editor
public boolean isContextMenuShowing()
{
return _contextMenu != null && _contextMenu.isShowing();
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
if (!popup.isShowing()) {
return;
代码示例来源:origin: org.netbeans.api/org-openide-awt
public static void dynamicChange(final JPopupMenu popup, boolean usedToBeContained) {
if (!popup.isShowing()) {
return;
代码示例来源:origin: mucommander/mucommander
/**
* Returns true if there is a selected item at the auto-completion popup window.
*/
protected boolean isItemSelectedAtPopupList() {
return popup.isShowing() && list.getSelectedIndex() >= 0;
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
@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();
代码示例来源:origin: org.gosu-lang.gosu/gosu-editor
public boolean isIntellisensePopupShowing()
{
return (_beanInfoPopup != null && _beanInfoPopup.isShowing()) ||
(_valuePopup != null && _valuePopup.isShowing());
}
代码示例来源:origin: tinyMediaManager/tinyMediaManager
private void removeListItem(TmmTaskHandle handle) {
taskMap.remove(handle);
pane.removeListComponent(handle);
if (popup.isShowing() && taskMap.isEmpty()) {
hidePopup();
}
else if (popup.isShowing()) {
resizePopup();
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public static boolean isPopupContained(JPopupMenu popup) {
if (!popup.isShowing()) {
return false;
}
return willPopupBeContained(popup, popup.getLocationOnScreen());
}
代码示例来源:origin: tinyMediaManager/tinyMediaManager
@Override
public void mouseClicked(MouseEvent e) {
if (popup.isShowing()) {
hidePopup();
}
else {
showPopup();
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public static boolean isPopupContained(JPopupMenu popup) {
if (!popup.isShowing()) {
return false;
}
return willPopupBeContained(popup, popup.getLocationOnScreen());
}
代码示例来源:origin: GoldenGnu/jeveassets
@Override
public void mouseExited(final MouseEvent e) {
mouseOverThis = false;
if (jPopupMenu.isShowing()) {
getModel().setRollover(true);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
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);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
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);
}
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
protected void togglePopup(java.awt.event.MouseEvent evt) {
if (popupMenu != null && popupMenu.isShowing() || popupBecameInvisible >= evt.getWhen()) {
popupMenu.setVisible(false);
} else {
showPopup(evt);
}
}
代码示例来源:origin: com.jtattoo/JTattoo
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();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!