本文整理了Java中org.eclipse.swt.widgets.Monitor.<init>()
方法的一些代码示例,展示了Monitor.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Monitor.<init>()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Monitor
类名称:Monitor
方法名:<init>
[英]Prevents uninitialized instances from being created outside the package.
[中]防止在包外部创建未初始化的实例。
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
/**
* Returns an array of monitors attached to the device.
*
* @return the array of monitors
*
* @since 1.2
*/
public Monitor[] getMonitors() {
checkDevice();
if( monitor == null ) {
monitor = new Monitor( this );
}
return new Monitor[] { monitor };
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
int /*long*/ monitorEnumProc (int /*long*/ hmonitor, int /*long*/ hdc, int /*long*/ lprcMonitor, int /*long*/ dwData) {
if (monitorCount >= monitors.length) {
Monitor[] newMonitors = new Monitor [monitors.length + 4];
System.arraycopy (monitors, 0, newMonitors, 0, monitors.length);
monitors = newMonitors;
}
MONITORINFO lpmi = new MONITORINFO ();
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
Monitor monitor = new Monitor ();
monitor.handle = hmonitor;
Rectangle boundsInPixels = new Rectangle (lpmi.rcMonitor_left, lpmi.rcMonitor_top, lpmi.rcMonitor_right - lpmi.rcMonitor_left,lpmi.rcMonitor_bottom - lpmi.rcMonitor_top);
monitor.setBounds (DPIUtil.autoScaleDown (boundsInPixels));
Rectangle clientAreaInPixels = new Rectangle (lpmi.rcWork_left, lpmi.rcWork_top, lpmi.rcWork_right - lpmi.rcWork_left, lpmi.rcWork_bottom - lpmi.rcWork_top);
monitor.setClientArea (DPIUtil.autoScaleDown (clientAreaInPixels));
monitors [monitorCount++] = monitor;
return 1;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
for (int i = 0; i < monitorCount; i++) {
OS.gdk_screen_get_monitor_geometry (screen, i, dest);
Monitor monitor = new Monitor ();
monitor.handle = i;
monitor.x = DPIUtil.autoScaleDown (dest.x);
Monitor monitor = new Monitor ();
Rectangle bounds = getBounds ();
monitor.x = bounds.x;
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
for (int i = 0; i < monitorCount; i++) {
OS.gdk_screen_get_monitor_geometry (screen, i, dest);
Monitor monitor = new Monitor ();
monitor.handle = i;
monitor.x = DPIUtil.autoScaleDown (dest.x);
Monitor monitor = new Monitor ();
Rectangle bounds = getBounds ();
monitor.x = bounds.x;
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
for (int i = 0; i < monitorCount; i++) {
OS.gdk_screen_get_monitor_geometry (screen, i, dest);
Monitor monitor = new Monitor ();
monitor.handle = i;
monitor.x = DPIUtil.autoScaleDown (dest.x);
Monitor monitor = new Monitor ();
Rectangle bounds = getBounds ();
monitor.x = bounds.x;
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
uiSession = ContextProvider.getUISession();
shells = new ArrayList<>();
monitor = new Monitor( this );
cursorLocation = new Point( 0, 0 );
bounds = readInitialBounds();
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
/**
* Returns the primary monitor for that device.
*
* @return the primary monitor
*
* @since 3.0
*/
public Monitor getPrimaryMonitor () {
checkDevice ();
Monitor monitor = new Monitor ();
NSArray screens = NSScreen.screens();
NSScreen screen = new NSScreen(screens.objectAtIndex(0));
NSRect frame = convertRect(screen, screen.frame());
monitor.handle = screen.id;
monitor.x = (int)frame.x;
monitor.y = (int)(frame.height - (frame.y + frame.height));
monitor.width = (int)frame.width;
monitor.height = (int)frame.height;
NSRect visibleFrame = convertRect(screen, screen.visibleFrame());
monitor.clientX = (int)visibleFrame.x;
monitor.clientY = (int)(frame.height - (visibleFrame.y + visibleFrame.height));
monitor.clientWidth = (int)visibleFrame.width;
monitor.clientHeight = (int)visibleFrame.height;
return monitor;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
lpmi.cbSize = MONITORINFO.sizeof;
OS.GetMonitorInfo (hmonitor, lpmi);
Monitor monitor = new Monitor ();
monitor.handle = hmonitor;
Rectangle bounds = new Rectangle (lpmi.rcMonitor_left, lpmi.rcMonitor_top, lpmi.rcMonitor_right - lpmi.rcMonitor_left, lpmi.rcMonitor_bottom - lpmi.rcMonitor_top);
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
Monitor [] monitors = new Monitor [count];
for (int i=0; i<count; i++) {
Monitor monitor = new Monitor ();
screen = new NSScreen(screens.objectAtIndex(i));
NSRect frame = convertRect(screen, screen.frame());
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
checkDevice ();
if (OS.IsWinCE || OS.WIN32_VERSION < OS.VERSION (4, 10)) {
Monitor monitor = new Monitor();
int width = OS.GetSystemMetrics (OS.SM_CXSCREEN);
int height = OS.GetSystemMetrics (OS.SM_CYSCREEN);
内容来源于网络,如有侵权,请联系作者删除!