목요일, 4월 23, 2009

RAP full screen

보통 RCP같은 경우 WorkbenchWindowAdvisor를 상속받은 클래스 즉,

public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {

public void createWindowContents(Shell shell) {
super.createWindowContents(shell);
shell.setMaximized(true);
}
를 수정해 주면 됩니다. 그렇지만 이렇게 RAP를 해주면 전체화면으로는 되지만, 정작
전체화면되어지고 화면안에 있는 Widget들은 전체화면에 맞게 재 배치 되어지지 않습니다.
내일 쯤 시간을 내어 디버깅을 해봐야 겠습니다.

그래서, 모든 화면이 오픈되고 마지막 후처리하는 메소드에 다음과 같이 추가하면 되겠습니다.
public void postWindowOpen() {
final IWorkbenchWindow window = getWindowConfigurer().getWindow();
Shell shell = window.getShell();
shell.setMaximized( true );
}

그러면 원래 의도했던 화면이 생성 됩니다.

댓글 없음:

댓글 쓰기