Presentation is loading. Please wait.

Presentation is loading. Please wait.

MIDP UI API.

Similar presentations


Presentation on theme: "MIDP UI API."— Presentation transcript:

1 MIDP UI API

2 Displayable class 유저 인터페이스 클래스 계층도

3 Display Display setCurrent(), GetCurrent() Method
각각의 MIDlet을 위하여 구체적으로 MIDlet의 실행을 화면에 보여주고 device의 display에 대한 정보를 제공해주는 디스플레이 매니저 setCurrent(), GetCurrent() Method void callSerially(Runnable r) Displayable getCurrent() static Display getDisplay(MIDlet m) boolean isColor() int numColors() void setCurrent(Alert alert, Displayable nextDisplayable) void setCurrent(Displayable nextDisplayable)

4 Screen Class Method Ticker : Ticker(String str)로 생성
Ticker getTicker() string getTitle() void setTicker(Ticker ticker) void setTitle(String s) Ticker : Ticker(String str)로 생성 텍스트 : Ticker.setString(String str), Ticker.getString(String str)사용 setTicker(Ticker) : screen에 추가 setTicker(null) : screen에서 제거

5 이벤트와 핸들링 MIDP UI두가지의 high-level event Command event
CommandListener 에 의해 정의 Command(String label, int commandType, int priority); Command Action() ItemStateChanged event 응용 프로그램은 form screendks에서 iteme들의 내부 상태변화에 대한 이벤트를 받기위하여 itemstatelistener Interface를 사용 Gauge의 interactive한 값을 조절할때. TextField의 값을 입력하거나 일부 수정할때 DataFiled에서 새로운 날짜나 시간을 입력할때 ChoiceGroup에서 선택된 값을 바꿀때.

6 List & Choice List Choice List(String title, int listTyep)
List(String title, int listType, String[] stringElements, Image[]) Choice Implicit choices : list box Exclusive choices : radio button Multiple choices : check box

7 TextBox 일정한 분량의 text를 입력 받기 위한 screen
TextBox(String title, String text, int maxSize, int constraints) 작성된 내용은 char array로 저장 setMaxSize() IllegalArgumentException (max값을 초과할때 발생)

8 Form Image, string, choice 등의 Item을 포함할 수 있는 Screen Form(String title)
Form(String Item[] tems)

9 Item StringItem StringItem(String label, String text)
setText() : 값 변경(애플리케이션만 가능) getText() ImageItem ImageItem(string label, Image img, int layout, string altText) Item ChoiceGroup TextField DataField Gauge ImageItem StringItem

10 Gauge class Method Int getMaxValue() Int getValue()
Blooean inInteractive() Void setMaxValue(int maxValue) Void setValue(int value)

11 Form & Canvas

12 DataField TextField DataField(String lable, int mode)
DataField(String lable, int mode, TimeZone timeZone) setInputMode(int Mode) getInputMode() TextField 사용자가 변경할 수 있는 문자열을 포함한 Item TextField(String lable, String text, int maxSize, int constraints) TextBox와 비슷


Download ppt "MIDP UI API."

Similar presentations


Ads by Google