예제 #1
0
 public Command save() {
   Command comm = null;
   if (!myLastSavedNotes.equals(text.getValue())) {
     comm =
         new SetPrivateTextCommand(
             this, new PrivateText(GameModule.getUserId(), (String) text.getValue()));
     comm.execute();
   }
   return comm;
 }
예제 #2
0
 public Command getRestoreCommand() {
   Command comm = null;
   for (PrivateText privateText : notes) {
     SetPrivateTextCommand c = new SetPrivateTextCommand(this, privateText);
     if (comm == null) {
       comm = c;
     } else {
       comm.append(c);
     }
   }
   return comm;
 }