コード例 #1
0
 public void undo() {
   try {
     MethodInvocationManager.invokeMethod( // frame,
         parentObject, addMethod, addParams);
     listener.commandActionPerformed();
   } catch (Exception e) {
     System.out.println("Could not undo: " + subtractMethod + " " + e);
   }
 }
コード例 #2
0
ファイル: SetCommand.java プロジェクト: pdewan/ObjectEditor
 public Object computeReadValue() {
   Object readValue;
   try {
     readValue = MethodInvocationManager.invokeMethod(readMethod, parentObject, readMethodParams);
     return Util.deepCopy(readValue);
   } catch (Exception e) {
     return null;
   }
 }
コード例 #3
0
  public Object execute() {
    try {
      Object subtractedValue =
          MethodInvocationManager.invokeMethod( // frame,
              parentObject, subtractMethod, subtractParams);
      assignToAddParams(subtractedValue);
      // listener.commandActionPerformed();
      return subtractedValue;

    } catch (Exception e) {
      System.out.println("Could not execute: " + subtractMethod + " " + e);
      return null;
    }
  }
コード例 #4
0
ファイル: SetCommand.java プロジェクト: pdewan/ObjectEditor
  public Object execute() {
    try {
      if (readMethod != null) {
        /*

        Object readValue = uiMethodInvocationManager.invokeMethod(readMethod,
        											   parentObject,
        											   readMethodParams);
        */
        assignToUndoWriteMethodParams(computeReadValue());
      }
      Object retVal =
          MethodInvocationManager.invokeMethod( // frame,
              parentObject, writeMethod, params);
      // listener.commandActionPerformed();
      return retVal;
    } catch (Exception e) {
      System.out.println("Could not execute: " + writeMethod + " " + e);
      return null;
    }
  }