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

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

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

Shell.setFullScreen介绍

[英]Sets the full screen state of the receiver. If the argument is true causes the receiver to switch to the full screen state, and if the argument is false and the receiver was previously switched into full screen state, causes the receiver to switch back to either the maximized or normal states.

Note: The result of intermixing calls to setFullScreen(true), setMaximized(true) and setMinimized(true) will vary by platform. Typically, the behavior will match the platform user's expectations, but not always. This should be avoided if possible.
[中]设置接收器的全屏状态。如果参数为true,则会导致接收器切换到全屏状态,如果参数为false,且接收器之前已切换到全屏状态,则会导致接收器切换回最大化或正常状态。
注意:混合调用setFullScreen(true)setMaximized(true)setMinimized(true)的结果将因平台而异。通常,这种行为会符合平台用户的期望,但并不总是如此。如果可能的话,应该避免这种情况。

代码示例

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

@Override
void setBoundsInPixels (int x, int y, int width, int height, int flags, boolean defer) {
  if (fullScreen) setFullScreen (false);
  /*
  * Bug in Windows.  When a window has alpha and
  * SetWindowPos() is called with SWP_DRAWFRAME,
  * the contents of the window are copied rather
  * than allowing the windows underneath to draw.
  * This causes pixel corruption.  The fix is to
  * clear the SWP_DRAWFRAME bits.
  */
  int bits = OS.GetWindowLong (handle, OS.GWL_EXSTYLE);
  if ((bits & OS.WS_EX_LAYERED) != 0) {
    flags &= ~OS.SWP_DRAWFRAME;
  }
  super.setBoundsInPixels (x, y, width, height, flags, false);
}

代码示例来源:origin: com.googlecode.playn/playn-swt-java

@Override
public void setSize(int width, int height, boolean fullscreen) {
 int rawWidth = ctx.scale.scaledCeil(width), rawHeight = ctx.scale.scaledCeil(height);
 platform.comp.setSize(rawWidth, rawHeight);
 platform.shell.setFullScreen(fullscreen);
 platform.shell.pack();
}

代码示例来源:origin: threerings/playn

@Override
public void setSize(int width, int height, boolean fullscreen) {
 int rawWidth = ctx.scale.scaledCeil(width), rawHeight = ctx.scale.scaledCeil(height);
 platform.comp.setSize(rawWidth, rawHeight);
 platform.shell.setFullScreen(fullscreen);
 platform.shell.pack();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

button.setBounds(20, 20, 120, 30);
button.setText(ControlExample.getResourceString("FullScreen"));
button.addSelectionListener(widgetSelectedAdapter(e -> currentShell.setFullScreen(button.getSelection())));
Button close = new Button(currentShell, SWT.PUSH);
close.setBounds(160, 20, 120, 30);

代码示例来源:origin: org.xworker/xworker_swt

shell.setEnabled(false);
}else if("fullScreen".equals(method)){
  shell.setFullScreen(true);
}else if("unFullScreen".equals(method)){
  shell.setFullScreen(false);
}else if("visible".equals(method)){
  shell.setVisible(true);

代码示例来源:origin: playn/playn

@Override public void setSize (int width, int height, boolean fullscreen) {
 plat.composite().setSize(width, height);
 plat.shell().setFullScreen(fullscreen);
 plat.shell().pack();
}

代码示例来源:origin: io.playn/playn-java-swt

@Override public void setSize (int width, int height, boolean fullscreen) {
 plat.composite().setSize(width, height);
 plat.shell().setFullScreen(fullscreen);
 plat.shell().pack();
}

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

height = Math.min(height, (2 << 14) - 1);
if (fullScreen) setFullScreen (false);

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

height = Math.min(height, (2 << 14) - 1);
if (fullScreen) setFullScreen (false);

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

height = Math.min(height, (2 << 14) - 1);
if (fullScreen) setFullScreen (false);

代码示例来源:origin: stackoverflow.com

shell.setLayout(new FillLayout());
shell.setFullScreen(true);
shell.setAlpha(0);

代码示例来源:origin: rinde/RinSim

shell.setFullScreen(true);
 shell.setMaximized(true);
} else {

代码示例来源:origin: be.yildiz-games/module-window-swt

/**
 * Make the window use all the screen and remove the title bar.
 */
void setFullScreen() {
  this.shell.setFullScreen(true);
  this.shell.setFocus();
  final Monitor m = Display.getDefault().getPrimaryMonitor();
  this.shell.setBounds(-1, -1, m.getBounds().width + 2, m.getBounds().height + 2);
  this.screenSize = new ScreenSize(m.getBounds().width, m.getBounds().height);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

shell.setFullScreen(!shell.getFullScreen());

代码示例来源:origin: BiglySoftware/BiglyBT

&& (event.stateMask & (SWT.MOD1 + SWT.SHIFT)) == SWT.MOD1
        + SWT.SHIFT) {
  shell.setFullScreen(!shell.getFullScreen());
}else if ( event.keyCode == SWT.F1 ){
  Utils.launch( Constants.URL_WIKI );

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

if (_getFullScreen ()) setFullScreen (false);
boolean sheet = window.isSheet();
if (sheet && move && !resize) return;

代码示例来源:origin: org.xworker/xworker_swt

shell.setFullScreen(fullScreen);

相关文章

微信公众号

最新文章

更多

Shell类方法