1 package jimm.datavision.gui.cmd; 2 import jimm.datavision.gui.EditWinWidget; 3 import jimm.util.I18N; 4 5 10 public class WidgetRenameCommand extends CommandAdapter { 11 12 protected EditWinWidget eww; protected String oldName; 14 protected String newName; 15 16 public WidgetRenameCommand(EditWinWidget eww, String oldName, String newName) { 17 super(I18N.get("WidgetRenameCommand.name")); 18 this.eww = eww; 19 this.oldName = oldName; 20 this.newName = newName; 21 } 22 23 public void perform() { 24 eww.setWidgetName(newName); 25 } 26 27 public void undo() { 28 eww.setWidgetName(oldName); 29 } 30 31 } 32 | Popular Tags |