| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 알고리즘
- boot
- javascript
- error
- MySQL
- 자바
- Git
- 이펙티브
- 독후감
- effective
- elasticsearch
- JPA
- java
- 리뷰
- 백준
- Web
- 엘라스틱서치
- 인터페이스
- nodejs
- Spring Boot
- 맛집
- node
- 자바스크립트
- java8
- 스프링
- RCP
- jface
- 후기
- Spring
- kibana
Archives
- Today
- Total
wedul
rcp dialog 화면 가운데 출력 본문
반응형
public Point getCenterPoint() {
Shell parentShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
Rectangle shellBounds = parentShell.getBounds();
return new Point(shellBounds.x + shellBounds.width / 2, (shellBounds.y + shellBounds.height) / 2);
}
Then simply override the getInitialLocation method of Dialog;
@Override
protected Point getInitialLocation(Point initialSize) {
Point shellCenter = getCenterPoint();
return new Point(shellCenter.x - initialSize.x / 2, shellCenter.y - initialSize.y / 2);
}
반응형
'RCP > SWT & JFACE' 카테고리의 다른 글
| RCP 확장점 소개 (0) | 2016.12.24 |
|---|---|
| rcp toolbar에서 label등 각종 contribution item 생성방법 (0) | 2016.12.24 |
| Eclipse GEF 개념 설명 (1) | 2016.12.24 |
| JFace Dialog에서 레이아웃 설정으로 버튼 바 숨기기 (1) | 2016.12.24 |
| java GUI 툴 SWT vs Swing vs AWT (0) | 2016.12.24 |