예제 #1
0
 /**
  * Respond to a command issued on any Screen.
  *
  * @param c command activated by the user
  * @param s the Displayable the command was on.
  */
 public void commandAction(Command c, Displayable s) {
   if (c == discoverCmd) {
     // user wants to discover the suites that can be installed
     discoverSuitesToInstall(urlTextBox.getString());
   } else if (s == installListBox && (c == List.SELECT_COMMAND || c == installCmd)) {
     installSuite(installListBox.getSelectedIndex());
   } else if (c == backCmd) {
     display.setCurrent(urlTextBox);
   } else if (c == saveCmd) {
     saveURLSetting();
   } else if (c == endCmd || c == Alert.DISMISS_COMMAND) {
     // goto back to the manager midlet
     notifyDestroyed();
   }
 }
예제 #2
0
  /** Save the URL setting the user entered in to the urlTextBox. */
  private void saveURLSetting() {
    String temp;
    Exception ex;

    temp = urlTextBox.getString();

    ex = GraphicalInstaller.saveSettings(temp, MIDletSuite.INTERNAL_SUITE_ID);
    if (ex != null) {
      displayException(Resource.getString(ResourceConstants.EXCEPTION), ex.toString());
      return;
    }

    defaultInstallListUrl = temp;

    displaySuccessMessage(Resource.getString(ResourceConstants.AMS_MGR_SAVED));
  }