Ejemplo n.º 1
0
 public void actionPerformed(ActionEvent e) {
   try {
     if (dialog.validate()) {
       generate(dialog.getValues(), UISupport.getToolHost(), modelItem);
     }
   } catch (Exception e1) {
     UISupport.showErrorMessage(e1);
   }
 }
Ejemplo n.º 2
0
  /**
   * Perform an
   *
   * @param target
   * @param param
   */
  public void performHeadless(T target, Object param) {
    this.valuesSettingID = this.getClass().getName() + "@values";
    if (target == null) this.valuesSettingID += "-global";
    else this.valuesSettingID += "-local";

    modelItem = target;

    try {
      generate(initValues((T) target, param), UISupport.getToolHost(), (T) target);
    } catch (Exception e1) {
      UISupport.showErrorMessage(e1);
    }
  }
Ejemplo n.º 3
0
  public void perform(T target, Object param) {
    this.valuesSettingID = this.getClass().getName() + "@values";
    if (target == null) this.valuesSettingID += "-global";
    else this.valuesSettingID += "-local";

    modelItem = target;

    // Could reuse the dialog in Swing, but not in Eclipse.
    // if( dialog == null )
    dialog = buildDialog((T) target);

    if (dialog == null) {
      try {
        generate(initValues((T) target, param), UISupport.getToolHost(), (T) target);
      } catch (Exception e1) {
        UISupport.showErrorMessage(e1);
      }
    } else {
      StringToStringMap values = initValues((T) target, param);

      dialog.setValues(values);
      dialog.setVisible(true);
    }
  }