* convenient method of adding a file to the device file system in order
* to demonstrate the FileSystemJournalListener.
*/
final MenuItem cameraItem =
new MenuItem(new StringProvider("Camera"), 0x230010, 0);
cameraItem.setCommand(new Command(new CommandHandler() {
/**
* @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
* Object)
*/
public void execute(final ReadOnlyCommandMetadata metadata,
final Object context) {
Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA,
new CameraArguments());
}
}));
// Menu item for deleting the selected file
final MenuItem deleteItem =
new MenuItem(new StringProvider("Delete"), 0x230020, 1);
deleteItem.setCommand(new Command(new CommandHandler() {
/**
* @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
* Object)
*/
public void execute(final ReadOnlyCommandMetadata metadata,
final Object context) {
deleteAction();
}
}));
// Menu item for displaying information on the selected file
final MenuItem selectItem =
new MenuItem(new StringProvider("Select"), 0x230030, 2);
selectItem.setCommand(new Command(new CommandHandler() {
/**
* @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
* Object)
*/
public void execute(final ReadOnlyCommandMetadata metadata,
final Object context) {
selectAction();
}
}));
// Menu item for going back one directory in the directory hierarchy
final MenuItem backItem =
new MenuItem(new StringProvider("Go Back"), 0x230040, 3);
backItem.setCommand(new Command(new CommandHandler() {
/**
* @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
* Object)
*/
public void execute(final ReadOnlyCommandMetadata metadata,