#####################################
# UI 처리 #
#####################################
작성자 : 장형화(hhjang97@venus.uos.ac.kr)
작성일 : 2005. 01. 17
수정일 :
원본 :
설명 :
WIPI 1.1 및 1.2 버전에서 프로그램할때 꼭 필요한
UI 처리 방법에 대하여 설명한다.
################################# ################################# #################################
#################################
# UI 관련 변수들..
#################################
UI와 관련된 변수는 크게 4가지가 있다.
1. Annunciator Size
2. Display Width
3. Display Height
WIPI 1.1 과 1.2 에서 다른점은 Annunciator 설정에 따라
Display Height가 틀려진다.
Annunciator 를 True로 한경우(176x220 기준)
| 변수 |
WIPI 1.1 |
WIPI 1.2 |
| Annunciator |
16 |
16 |
| Height |
221 |
204 |
Annunciator 를 false로 한경우(176x220 기준)
| 변수 |
WIPI 1.1 |
WIPI 1.2 |
| Annunciator |
16 |
16 |
| Height |
205 |
204 |
위와 같이 설정이 다르기 때문에 1.1과 1.2를 동시에 만족시킬려면
아래 예와 같이 Annunciator 를 false 로 놓고
(0.0) 에서 (display.getWidth(), display.getHeight()) 범위안에서
UI 작업을 하면 된다.
이렇게 설정을 하면 개발은 1.1 에서 하고 개발후 1.2에서 테스트를 하면 되기 때문에
개발을 빨리 할 수 있는 장점이 있다.
=====================================================================
public class LShopMain extends Jlet{
private Display display;
private AnnunciatorComponent annct;
protected void startApp(String[] args){
display = Display.getDefaultDisplay();
// false 로 설정한다.
annct = new AnnunciatorComponent(false);
annct.show();
// 왼쪽 하단 버튼
g.drawImage(leftBtn, 0, display.getHeight(), Graphics.BOTTOM|Graphics.LEFT);
// 오른쪽 하단 버튼
g.drawImage(rightBtn, display.getWidth(), display.getHeight(), Graphics.BOTTOM|Graphics.RIGHT);
=====================================================================
#################################
#
#################################