本文整理了Java中org.eclipse.swt.widgets.Shell.getSize()
方法的一些代码示例,展示了Shell.getSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.getSize()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:getSize
暂无
代码示例来源:origin: pentaho/pentaho-kettle
private boolean willLicenseTextFit( String licenseText, GC gc ) {
Point splashSize = splash.getSize();
Point licenseDrawLocation = new Point( 290, 290 );
Point requiredSize = gc.textExtent( licenseText );
int width = splashSize.x - licenseDrawLocation.x;
int height = splashSize.y - licenseDrawLocation.y;
boolean fitsVertically = width >= requiredSize.x;
boolean fitsHorizontally = height >= requiredSize.y;
return ( fitsVertically && fitsHorizontally );
}
代码示例来源:origin: pentaho/pentaho-kettle
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
private void setPosition() {
Rectangle shellBounds = getParent().getBounds();
Point dialogSize = dialog.getSize();
dialog.setLocation( shellBounds.x + ( shellBounds.width - dialogSize.x ) / 2,
shellBounds.y + ( shellBounds.height - dialogSize.y ) / 2 );
}
}
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
protected void setPosition() {
Rectangle shellBounds = getParent().getBounds();
Point dialogSize = dialog.getSize();
dialog.setLocation( shellBounds.x + ( shellBounds.width - dialogSize.x ) / 2, shellBounds.y
+ ( shellBounds.height - dialogSize.y ) / 2 );
}
}
代码示例来源:origin: pentaho/pentaho-kettle
public void handleEvent( Event event ) {
Point size = shell.getSize();
wFields.setSize( size.x - 10, size.y - 50 );
wFields.table.setSize( size.x - 10, size.y - 50 );
wFields.redraw();
}
};
代码示例来源:origin: pentaho/pentaho-kettle
protected void openDialog() {
shell.pack();
// Set the focus on the OK button
wOK.setFocus();
Rectangle shellBounds = getParent().getBounds();
Point dialogSize = shell.getSize();
shell.setLocation( shellBounds.x + ( shellBounds.width - dialogSize.x ) / 2, shellBounds.y
+ ( shellBounds.height - dialogSize.y ) / 2 );
shell.open();
while ( !shell.isDisposed() ) {
if ( !display.readAndDispatch() ) {
display.sleep();
}
}
}
代码示例来源:origin: pentaho/pentaho-kettle
/**
*
* @param shell
* the shell.
*/
public SapInputAboutDialog( final Shell shell ) {
this.dialog = new Shell( shell, SWT.BORDER | SWT.CLOSE | SWT.APPLICATION_MODAL | SWT.SHEET );
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
this.dialog.setLayout( gridLayout );
this.dialog.setText( BaseMessages.getString( PKG, "SapInputDialog.About.Shell.Title" ) );
this.dialog.setImage( shell.getImage() );
this.buildIconCell();
this.buildPluginInfoCell();
this.buildOkButton();
this.dialog.pack();
Rectangle shellBounds = shell.getBounds();
Point dialogSize = this.dialog.getSize();
this.dialog.setLocation( shellBounds.x + ( shellBounds.width - dialogSize.x ) / 2, shellBounds.y
+ ( shellBounds.height - dialogSize.y ) / 2 );
}
内容来源于网络,如有侵权,请联系作者删除!