本文整理匯總了Java中org.eclipse.swt.widgets.Shell.setMinimumSize方法的典型用法代碼示例。如果您正苦於以下問題:Java Shell.setMinimumSize方法的具體用法?Java Shell.setMinimumSize怎麽用?Java Shell.setMinimumSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.widgets.Shell
的用法示例。
在下文中一共展示了Shell.setMinimumSize方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: MainAvoCADoShell
import org.eclipse.swt.widgets.Shell; //導入方法依賴的package包/類
/**
* create the main avoCADo shell and display it
* @param display
*/
public MainAvoCADoShell(Display display){
shell = new Shell(display);
setupShell(); // place components in the main avoCADo shell
shell.setText("avoCADo");
shell.setSize(800, 600); //TODO: set intial size to last known size
shell.setMinimumSize(640, 480);
Rectangle b = display.getBounds();
int xPos = Math.max(0, (b.width-800)/2);
int yPos = Math.max(0, (b.height-600)/2);
shell.setLocation(xPos, yPos);
shell.setImage(ImageUtils.getIcon("./avoCADo.png", 32, 32));
shell.open();
AvoGlobal.intializeNewAvoCADoProject(); // initialize app to starting model/view.
StartupSplashShell.closeSplash();
// handle events while the shell is not disposed
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
示例2: configureShell
import org.eclipse.swt.widgets.Shell; //導入方法依賴的package包/類
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
String imagePath = null;
//TODO Please uncomment below code before build.
try{
newShell.setImage(ImagePathConstant.APP_ICON.getImageFromRegistry());
if(OSValidator.isMac()){
newShell.setMinimumSize(new Point(500, 500));
}else{
newShell.setMinimumSize(new Point(500, 525));
}
}catch(SWTError e){
logger.debug("Unable to access image" , e);
}
}