Java Code Examples for org.eclipse.swt.widgets.Shell#getMaximized()

The following examples show how to use org.eclipse.swt.widgets.Shell#getMaximized() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WindowProperty.java    From hop with Apache License 2.0 5 votes vote down vote up
public WindowProperty( Shell shell ) {
  name = shell.getText();

  maximized = shell.getMaximized();
  Rectangle rectangle = shell.getBounds();
  this.x = rectangle.x;
  this.y = rectangle.y;
  this.width = rectangle.width;
  this.height = rectangle.height;
}
 
Example 2
Source File: SWTUtil.java    From eclipse-cs with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void controlResized(ControlEvent e) {
  // update the internal bounds
  Shell shell = (Shell) e.getSource();
  mMaximized = shell.getMaximized();
  mMinimized = shell.getMinimized();

  // only store new bounds if the shell is not minimized or maximized.
  // This way the original size (before minimizing/maximizing will be
  // remembered.
  if (!mMinimized && !mMaximized) {
    mNewBounds = shell.getBounds();
  }
}
 
Example 3
Source File: SaveWindowLocationAdapter.java    From logbook with MIT License 5 votes vote down vote up
@Override
public void shellClosed(ShellEvent e) {
    if (e.widget instanceof Shell) {
        Shell shell = (Shell) e.widget;
        // 最大化の状態では保存しない
        if (!shell.getMaximized()) {
            LayoutLogic.saveWindowLocation(this.dialogClass, shell);
        }
    }
}
 
Example 4
Source File: WindowProperty.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public WindowProperty( Shell shell ) {
  name = shell.getText();

  maximized = shell.getMaximized();
  rectangle = shell.getBounds();
}