1 /*
2 * Created on Sep 13, 2004
3 *
4 */
5 package ubc.midp.mobilephoto.core.ui.screens;
6
7 import javax.microedition.lcdui.Choice;
8 import javax.microedition.lcdui.Command;
9 import javax.microedition.lcdui.List;
10
11
12 /**
13 * @author trevor
14 *
15 * This screen shows a listing of all photos for a selected photo album.
16 * This is the screen that contains most of the feature menu items.
17 * From this screen, a user can choose to view photos, add or delete photos,
18 * send photos to other users etc.
19 *
20 */
21 public class PhotoListScreen extends List {
22
23 //Add the core application commands always
24 public static final Command viewCommand = new Command("View", Command.ITEM, 1);
25 public static final Command addCommand = new Command("Add", Command.ITEM, 1);
26 public static final Command deleteCommand = new Command("Delete", Command.ITEM, 1);
27 public static final Command backCommand = new Command("Back", Command.BACK, 0);
28
29 public static final Command editLabelCommand = new Command("Edit Label", Command.ITEM, 1);
30
31 // #ifdef includeCountViews
32 public static final Command sortCommand = new Command("Sort by Views", Command.ITEM, 1);
33 // #endif
34
35 // #ifdef includeFavourites
36 public static final Command favoriteCommand = new Command("Set Favorite", Command.ITEM, 1);
37 public static final Command viewFavoritesCommand = new Command("View Favorites", Command.ITEM, 1);
38 // #endif
39
40 /**
41 * Constructor
42 */
43 public PhotoListScreen() {
44 super("Choose Items", Choice.IMPLICIT);
45 }
46
47 /**
48 * Initialize the menu items for this screen
49 */
50 public void initMenu() {
51
52 //Add the core application commands always
53 this.addCommand(viewCommand);
54 this.addCommand(addCommand);
55 this.addCommand(deleteCommand);
56
57 this.addCommand(editLabelCommand);
58
59 // #ifdef includeCountViews
60 this.addCommand(sortCommand);
61 // #endif
62
63 // #ifdef includeFavourites
64 this.addCommand(favoriteCommand);
65 // #endif
66
67 this.addCommand(backCommand);
68
69 //Add the optional feature menu items only if they are specified in
70 //the xxxBuild.properties file using the 'preprocessor.symbols' value
71
72
73 }
74
75 }
|