Midp gui
Download
1 / 12

MIDP GUI - PowerPoint PPT Presentation


  • 145 Views
  • Uploaded on

MIDP GUI. Displayable. Screen. Canvas. GameCanvas. Alert. List. Form. TextBox. Displayable hierarki. Displayable. Screen. High Level GUI. Alert. List. Form. TextBox. High Level GUI. Commands 1. MIDlet implements CommandListener mainForm.setCommandListener(this);

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' MIDP GUI' - cullen


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Displayable hierarki

Displayable

Screen

Canvas

GameCanvas

Alert

List

Form

TextBox

Displayable hierarki


High level gui

Displayable

Screen

High Level GUI

Alert

List

Form

TextBox

High Level GUI


Commands 1
Commands 1

MIDlet implements CommandListener

mainForm.setCommandListener(this);

exitCmd = new Command(“Exit”, Command.EXIT, 2);

loginCmd = new Command(“Login”, Command.SCREEN, 3);

public void commandAction(Command c, Displayable d) {      String label = c.getLabel();      if(label.equals(”Exit")) {        destroyApp(true);      } else if(label.equals("Login")) {

....      }


Commands 2
Commands 2

MIDlet implements CommandListener

mainForm.setCommandListener(this);

exitCmd = new Command(“Exit”, Command.EXIT, 2);

loginCmd = new Command(“Login”, Command.SCREEN, 3);

public void commandAction(Command c, Displayable d) {

if (d == mainScreen) {

if (c == exitCmd) {

....

}

} else if (d == setupScreen) {

if (c == loginCmd) {

....

}


Forms 1
Forms 1

  • En Form indeholder Items:

    • ChoiceGroup

    • CustomItem

    • DateField

    • Gauge

    • ImageItem

    • Spacer

    • StringItem

    • TextField


Forms 2
Forms 2

Form f = new Form("FormX");

TextField t = new TextField("TF1:", "abc", 10, TextField.ANY);

f.append(t);

TextField n = new TextField("TF2:", "123", 10, TextField.NUMERIC);

f.append(n);

t.setLayout(Item.LAYOUT_LEFT | Item.LAYOUT_TOP);

n.setLayout(Item.LAYOUT_RIGHT | Item.LAYOUT_BOTTOM);


Forms 3
Forms 3

MIDlet implements CommandListener, ItemCommandListener, ItemStateListener {

setCommandListener(this);

public void commandAction(Command c, Displayable s)

setItemCommandListener(this);

public void commandAction(Command c, Item item)

setItemStateListener(this);

public void itemStateChanged(Item item)


Lists 1
Lists 1

List services = new List("Choose one", Choice.EXCLUSIVE)

     services.append("Check Mail", null); services.append("Compose", null); services.append("Addresses", null); services.append("Options", null); services.append("Sign Out", null); display.setCurrent(services);

Også Choice.MULTIPLE, Choice.IMPLICIT


Lists 2
Lists 2

public void commandAction(Command c, Displayable d) {

if (c == List.SELECT_COMMAND && d == services) {

int actionIndex = services.getSelectedIndex();

if (actionIndex < 0) return;

String action = services.getString(actionIndex);

....


Grundregler
Grundregler

Få visninger eller valgmuligheder pr skærm

Minimer mængden af manuelt input

Ingen detaljerede skærmdesign overvejelser

Ensartet navngivning og virkemåde af “ens” kommandoer

Enkelt og overskueligt flow mellem skærme

Test på mange telefonmodeller


ad