48
BlackBerry Device Applications Integration Guide
Code sample: Using tasks
Example: TaskDemo.java
/**
* TaskDemo.java
* Copyright (C) 2002-2005 Research In Motion Limited.
*/
package com.rim.samples.docs.taskdemo;
import java.io.*;
import java.util.*;
import javax.microedition.pim.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.i18n.*;
import net.rim.device.api.system.*;
import net.rim.device.api.util.*;
public final class TaskDemo extends UiApplication
{
private TaskScreen _taskScreen;
public static void main(String[] args) {
new TaskDemo().enterEventDispatcher();
}
private TaskDemo() {
_taskScreen = new TaskScreen();
pushScreen(_taskScreen);
}
public final static class TaskScreen extends MainScreen
{
// Members.
private EditField _summary, _note;
private DateField _due;
private ObjectChoiceField _priority, _status;
private SaveMenuItem _saveMenuItem;
private class SaveMenuItem extends MenuItem
{
private SaveMenuItem() {
super(null, 0, 100000, 5);
}
public String toString() {
return “Save”;
}
public void run() {
onSave();
}
}
public TaskScreen() {
Summary of Contents for JAVA DEVELOPMENT ENVIRONMENT - - DEVICE APPLICATIONS INTEGRATION - DEVELOPMENT GUIDE
Page 4: ......
Page 7: ......
Page 10: ...10 BlackBerry Device Applications Integration Guide...
Page 12: ...12 BlackBerry Device Applications Integration Guide...
Page 50: ...50 BlackBerry Device Applications Integration Guide...
Page 56: ...56 BlackBerry Device Applications Integration Guide...
Page 65: ......
Page 66: ...2008 Research In Motion Limited Published in Canada...