01: package net.refractions.udig.printing.ui.internal.editor.commands;
02:
03: import net.refractions.udig.printing.model.Connection;
04: import net.refractions.udig.printing.ui.internal.Messages;
05:
06: import org.eclipse.gef.commands.Command;
07:
08: public class ConnectionDeleteCommand extends Command {
09:
10: private Connection connection;
11:
12: public ConnectionDeleteCommand(Connection connection) {
13: super ();
14: setLabel(Messages.ConnectionDeleteCommand_label);
15: this .connection = connection;
16: }
17:
18: public void execute() {
19: connection.disconnect();
20: }
21:
22: public void undo() {
23: connection.reconnect();
24: }
25: }
|