当我在linux环境中启动应用程序时,我得到一个小窗口,然后它会自动最大化到窗口大小。
我不知道为什么应用程序在启动时会以很小的窗口大小启动。
public void postWindowOpen()
{
IWorkbenchPage activePage = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage();
IViewPart cView = activePage
.findView(IConsoleConstants.ID_CONSOLE_VIEW);
if (cView != null)
{
activePage.hideView(cView);
}
getWindowConfigurer().getWindow().getShell().setMaximized(true);
}
public void postWindowCreate()
{
// TODO Auto-generated method stub
super.postWindowCreate();
Display display = Display.getDefault();
Shell shell = Display.getCurrent().getActiveShell();
if(null != shell && !shell.isDisposed())
{
shell.setMaximized(true);
}
}
有什么办法可以避免出现此问题