aImages[i] = rViewController.getNodeController().getNodeImage(sType,
null);
aTypes[i] = getString(sType);
}
final ChoiceGroup aChoice = new ChoiceGroup(getString("JL_LNodeType"),
Choice.EXCLUSIVE, aTypes,
aImages);
final TextField aInput = new TextField(getString("JL_LNodeName"),
null, MAX_TITLE_SIZE,
TextField.ANY);
// Use a MessageScreen to query the new title and, if confirmed, callback
// to method newNode(); params null, null: no Image, empty textfield
MessageScreen.showMessageBox(getString("JL_MtNewNode"), null, null,
new Item[] { aChoice, aInput }, false,
new Executable()
{
public void execute(Object rArg)
throws UserNotificationException
{
// this callback will only be invoked if the user selects Ok
newNode(aTypeKeys[aChoice
.getSelectedIndex()],
aInput.getString());
}
});
}