01: /* uDig - User Friendly Desktop Internet GIS client
02: * http://udig.refractions.net
03: * (C) 2004, Refractions Research Inc.
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation;
08: * version 2.1 of the License.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: */
15: package net.refractions.udig.printing.ui;
16:
17: import net.refractions.udig.printing.ui.internal.editor.parts.BoxPart;
18:
19: import org.eclipse.gef.commands.Command;
20:
21: /**
22: * Provides a UI for creating commands to edit a box's model
23: * and creates the command for modifying the model.
24: * @author Jesse
25: * @since 1.1.0
26: */
27: public interface IBoxEditAction {
28: /**
29: * Initializes the box edit action.
30: * @param parent the parent composite that can be used to create the user interface.
31: */
32: public void init(BoxPart owner);
33:
34: /**
35: * Creates the UI for the user to make a change to the model.
36: * <p><b>DOES NOT CHANGE THE MODEL!!!!</b></p>
37: * Only the command should change the model.
38: */
39: public void perform();
40:
41: /**
42: * Called by framework to determine if the command can be executed.
43: */
44: public boolean isDone();
45:
46: /**
47: * Creates the command that will change the model.
48: *
49: * @return the command that will change the model.
50: */
51: public Command getCommand();
52: }
|