Java Reference
In-Depth Information
Figure 7.7 Application views for Cellulite
In this section, we run through some of the more relevant portions of
the code but there isn't room for all of it, so you will need to download
the source code from the website for this topic. 9
7.6.1 High-level API
Cellulite uses the high-level API for the main and data entry screens
and the low-level API for drawing on the graph screen. The application
consists of a main class that extends the IApplication abstract class
as required by the framework:
package com.symbian.javame.doja.cellulite;
import com.nttdocomo.ui.*;
import java.util.*;
public class Cellulite extends IApplication {
private static String APP_TITLE = "Cellulite";
private static final float WEIGHT_MIN = 1.0F;
private static final float WEIGHT_MAX = 200.0F;
// view ids
private static final int VIEW_MAIN = 0;
private static final int VIEW_EDIT_ENTRY
= 1;
private static final int VIEW_GRAPH_DATA
= 2;
// data members
private WeightEntry currentEntry;
private Vector database;
private int nextRecordId;
Search WWH ::

Custom Search