Beispiel #1
0
 /**
  * Cancels the command, undoing the effects of any {@link #preview()} calls. For this method to do
  * anything, the command must implement the {@link Previewable} interface.
  */
 @Override
 public void cancel() {
   if (!(command instanceof Previewable)) return; // nothing to cancel
   final Previewable previewPlugin = (Previewable) command;
   previewPlugin.cancel();
 }
Beispiel #2
0
 /**
  * Computes a preview of the command's results. For this method to do anything, the command must
  * implement the {@link Previewable} interface.
  */
 @Override
 public void preview() {
   if (!(command instanceof Previewable)) return; // cannot preview
   final Previewable previewPlugin = (Previewable) command;
   previewPlugin.preview();
 }