| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 29 | 30 | 31 |
Tags
- 알고리즘
- 맛집
- 자바스크립트
- 이펙티브
- error
- 스프링
- Git
- javascript
- 리뷰
- node
- boot
- 자바
- 엘라스틱서치
- nodejs
- 독후감
- RCP
- Web
- elasticsearch
- MySQL
- Spring
- jface
- 인터페이스
- 후기
- JPA
- kibana
- Spring Boot
- java8
- effective
- java
- 백준
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 |
