org.eclipse.swt.widgets.Shell.getLocationInPixels()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中org.eclipse.swt.widgets.Shell.getLocationInPixels()方法的一些代码示例,展示了Shell.getLocationInPixels()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.getLocationInPixels()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:getLocationInPixels

Shell.getLocationInPixels介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
Point getWindowOrigin () {
  if (!mapped) {
    /*
     * Special case: The handle attributes are not initialized until the
     * shell is made visible, so gdk_window_get_origin () always returns {0, 0}.
     *
     * Once the shell is realized, gtk_window_get_position () includes
     * window trims etc. from the window manager. That's why getLocation ()
     * is not safe to use for coordinate mappings after the shell has been made visible.
     */
    return getLocationInPixels ();
  }
  return super.getWindowOrigin( );
}
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
Point getWindowOrigin () {
  if (!mapped) {
    /*
     * Special case: The handle attributes are not initialized until the
     * shell is made visible, so gdk_window_get_origin () always returns {0, 0}.
     *
     * Once the shell is realized, gtk_window_get_position () includes
     * window trims etc. from the window manager. That's why getLocation ()
     * is not safe to use for coordinate mappings after the shell has been made visible.
     */
    return getLocationInPixels ();
  }
  return super.getWindowOrigin( );
}
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
Point getWindowOrigin () {
  if (!mapped) {
    /*
     * Special case: The handle attributes are not initialized until the
     * shell is made visible, so gdk_window_get_origin () always returns {0, 0}.
     *
     * Once the shell is realized, gtk_window_get_position () includes
     * window trims etc. from the window manager. That's why getLocation ()
     * is not safe to use for coordinate mappings after the shell has been made visible.
     */
    return getLocationInPixels ();
  }
  return super.getWindowOrigin( );
}
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

if (!moved) {
  moved = true;
  Point location = getLocationInPixels();
  oldX = location.x;
  oldY = location.y;

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

if (!moved) {
  moved = true;
  Point location = getLocationInPixels();
  oldX = location.x;
  oldY = location.y;

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

if (!moved) {
  moved = true;
  Point location = getLocationInPixels();
  oldX = location.x;
  oldY = location.y;

相关文章

微信公众号

最新文章

更多

Shell类方法