本文整理了Java中javax.swing.JPopupMenu.getHeight()
方法的一些代码示例,展示了JPopupMenu.getHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPopupMenu.getHeight()
方法的具体详情如下:
包路径:javax.swing.JPopupMenu
类名称:JPopupMenu
方法名:getHeight
暂无
代码示例来源:origin: org.netbeans.api/org-openide-awt
int maxX = popup.getLocationOnScreen().x + popup.getWidth();
int minY = popup.getLocationOnScreen().y;
int maxY = popup.getLocationOnScreen().y + popup.getHeight();
if (e.getXOnScreen() < minX || e.getXOnScreen() >= maxX || e.getYOnScreen() < minY || e.getYOnScreen() >= maxY) {
popup.setVisible(false);
int minY = overflowButton.getLocationOnScreen().y;
int maxY_ob = minY + overflowButton.getHeight();
int maxY = getOrientation() == HORIZONTAL ? minY + overflowButton.getHeight() + popup.getHeight()
: minY + popup.getHeight();
if (e.getXOnScreen() < minX || e.getYOnScreen() < minY || e.getXOnScreen() > maxX || e.getYOnScreen() > maxY
|| (getOrientation() == HORIZONTAL && e.getXOnScreen() > maxX_ob
代码示例来源:origin: eugener/oxbow
private boolean isInResizeSpot( Point point ) {
if ( point == null ) return false;
Rectangle resizeSpot = new Rectangle(
menu.getWidth()-REZSIZE_SPOT_SIZE,
menu.getHeight()-REZSIZE_SPOT_SIZE,
REZSIZE_SPOT_SIZE,
REZSIZE_SPOT_SIZE );
return resizeSpot.contains(point);
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction(jsDoc = HEIGHT_JSDOC)
@Override
public int getHeight() {
return super.getHeight();
}
代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-widgets-extra
private boolean isInResizeSpot(Point point) {
if (point == null) return false;
Rectangle resizeSpot = new Rectangle(
menu.getWidth() - REZSIZE_SPOT_SIZE,
menu.getHeight() - REZSIZE_SPOT_SIZE,
REZSIZE_SPOT_SIZE,
REZSIZE_SPOT_SIZE);
return resizeSpot.contains(point);
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets
private boolean isInResizeSpot(Point point) {
if (point == null) return false;
Rectangle resizeSpot = new Rectangle(
menu.getWidth() - REZSIZE_SPOT_SIZE,
menu.getHeight() - REZSIZE_SPOT_SIZE,
REZSIZE_SPOT_SIZE,
REZSIZE_SPOT_SIZE);
return resizeSpot.contains(point);
}
代码示例来源:origin: org.bidib.org.oxbow/swingbits
private boolean isInResizeSpot( Point point ) {
if ( point == null ) return false;
Rectangle resizeSpot = new Rectangle(
menu.getWidth()-REZSIZE_SPOT_SIZE,
menu.getHeight()-REZSIZE_SPOT_SIZE,
REZSIZE_SPOT_SIZE,
REZSIZE_SPOT_SIZE );
return resizeSpot.contains(point);
}
代码示例来源:origin: net.sf.squirrel-sql.plugins/graph
public void showPopupAbove(Point loc, GraphControllerPopupListener graphControllerPopupListener)
{
if (_popUp.isVisible())
{
_popUp.setVisible(false);
}
else
{
_popUp.show(_desktopPane,0,0);
_popUp.setLocation(loc.x, loc.y - _popUp.getHeight());
}
_currentGraphControllerPopupListener = graphControllerPopupListener;
}
代码示例来源:origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun
protected void showPopup(PInputEvent e) {
Component invoker = (Component) e.getComponent();
if ((invoker != null) && (popup != null) && (popup.getComponentCount() > 0)) {
int x = (int) e.getCanvasPosition().getX();
int y = (int) e.getCanvasPosition().getY();
if (x + popup.getWidth() > invoker.getX() + invoker.getWidth()) {
x = invoker.getX() + invoker.getWidth() - popup.getWidth();
}
if (y + popup.getHeight() > invoker.getY() + invoker.getHeight()) {
y = invoker.getY() + invoker.getHeight() - popup.getHeight();
}
popup.show(invoker, x, y);
}
}
代码示例来源:origin: datacleaner/DataCleaner
y = menu.getHeight() * -1;
break;
case LEFT:
代码示例来源:origin: google/sagetv
screenLoc.x -= theMenu.getWidth();
if ((screenLoc.y + theMenu.getHeight()) > scrBounds.y + scrBounds.height - screenInsets.bottom)
y -= theMenu.getHeight();
screenLoc.y -= theMenu.getHeight();
内容来源于网络,如有侵权,请联系作者删除!