コード例 #1
0
 public UISWTInstance getUISWTInstance() {
   UISWTInstanceImpl impl = mainWindow.getUISWTInstanceImpl();
   if (impl == null) {
     Debug.out("No uiswtinstanceimpl");
   }
   return impl;
 }
コード例 #2
0
  public void performAction(int action_id, Object args, final actionListener listener) {
    if (action_id == ACTION_FULL_UPDATE) {

      FullUpdateWindow.handleUpdate((String) args, listener);

    } else if (action_id == ACTION_UPDATE_RESTART_REQUEST) {

      String MSG_PREFIX = "UpdateMonitor.messagebox.";

      String title = MessageText.getString(MSG_PREFIX + "restart.title");

      String text = MessageText.getString(MSG_PREFIX + "restart.text");

      bringToFront();

      boolean no_timeout = args instanceof Boolean && ((Boolean) args).booleanValue();

      int timeout = 180000;

      if (no_timeout
          || !PluginInitializer.getDefaultInterface().getPluginManager().isSilentRestartEnabled()) {

        timeout = -1;
      }

      promptUser(
          title,
          text,
          new String[] {
            MessageText.getString("UpdateWindow.restart"),
            MessageText.getString("UpdateWindow.restartLater")
          },
          0,
          null,
          null,
          false,
          timeout,
          new UserPrompterResultListener() {
            public void prompterClosed(int result) {
              listener.actionComplete(result == 0);
            }
          });
    } else {

      Debug.out("Unknown action " + action_id);
    }
  }