コード例 #1
0
 public boolean undoIt() {
   try {
     document.deleteCommand(position, strng.length());
   } catch (Exception e) {
     return false;
   } // try
   return true;
 } // undoIt()
コード例 #2
0
 /**
  * Perform the command encapsulated by this object.
  *
  * @return true if this call to doCommand was successful and can be undone.
  */
 public boolean doIt() {
   try {
     document.insertStringCommand(position, strng);
   } catch (Exception e) {
     return false;
   } // try
   return true;
 } // doIt()