ActivityIndicatorFactory.createActivityIndicator(0, bitmap, 5,
0);
_views[5].add(_views[6]);
add(_views[5]);
final MenuItem cancelItem =
new MenuItem(new StringProvider("Cancel spinners "), 0x230020,
0);
cancelItem.setCommand(new Command(new CommandHandler() {
/**
* @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
* Object)
*/
public void execute(final ReadOnlyCommandMetadata metadata,
final Object context) {
for (int i = _views.length - 1; i >= 0; --i) {
_views[i].getModel().cancel();
}
}
}));
final MenuItem resetItem =
new MenuItem(new StringProvider("Reset spinners "), 0x230030, 0);
resetItem.setCommand(new Command(new CommandHandler() {
/**
* @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
* Object)
*/
public void execute(final ReadOnlyCommandMetadata metadata,
final Object context) {
for (int i = _views.length - 1; i >= 0; --i) {
_views[i].getModel().reset();
}
}
}));
final MenuItem resumeItem =
new MenuItem(new StringProvider("Resume spinners "), 0x230040,
0);
resumeItem.setCommand(new Command(new CommandHandler() {
/**
* @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
* Object)
*/
public void execute(final ReadOnlyCommandMetadata metadata,
final Object context) {
for (int i = _views.length - 1; i >= 0; --i) {
_views[i].getModel().resume();
}
}
}));
final MenuItem delayedStop =
new MenuItem(new StringProvider("Delayed start"), 0x230050, 0);
delayedStop.setCommand(new Command(new CommandHandler() {
/**
* @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
* Object)
*/
public void execute(final ReadOnlyCommandMetadata metadata,
final Object context) {
for (int i = _views.length - 1; i >= 0; --i) {
final DelayedStart ds = new DelayedStart(_views[i]);
ds.start();
}
}
}));
final MenuItem delayedStart =
new MenuItem(new StringProvider("Delayed stop"), 0x230060, 0);
delayedStart.setCommand(new Command(new CommandHandler() {
/**
* @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
* Object)
*/
public void execute(final ReadOnlyCommandMetadata metadata,
final Object context) {
for (int i = _views.length - 1; i >= 0; --i) {
final DelayedStop ds = new DelayedStop(_views[i]);
ds.start();
}
}
}));
final MenuItem showPopupItem =
new MenuItem(new StringProvider("Show Popup"), 0x230010, 0);
showPopupItem.setCommand(new Command(new CommandHandler() {
/**
* @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
* Object)
*/
public void execute(final ReadOnlyCommandMetadata metadata,