01: /*
02: * uDig - User Friendly Desktop Internet GIS client
03: * http://udig.refractions.net
04: * (C) 2004, Refractions Research Inc.
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: */
17: package net.refractions.udig.project.ui;
18:
19: import net.refractions.udig.project.ui.tool.IToolContext;
20:
21: import org.eclipse.swt.graphics.Point;
22: import org.eclipse.swt.widgets.Composite;
23: import org.eclipse.swt.widgets.Control;
24: import org.geotools.feature.Feature;
25:
26: /**
27: * A "Page" that will have a ToolContext object set each time an the active MapEditor changes. If
28: * the current editor is not a map editor the the context will be null otherwise it will be a
29: * context that will operate against the map contained by the map editor.
30: *
31: * @author jeichar
32: * @since 0.9.0
33: */
34: public interface IUDIGDialogPage {
35: /**
36: * Sets the current context object
37: */
38: void setContext(IToolContext context);
39:
40: /**
41: * Returns the current context object
42: *
43: * @return the current context object
44: */
45: IToolContext getContext();
46:
47: /**
48: * The method must create a control. The Layout data need not be set. The edit feature will be
49: * set before this method is called.
50: */
51: public void createControl(Composite parent);
52:
53: /**
54: * This method must return the control created by createControl.
55: */
56: public Control getControl();
57:
58: /**
59: * Returns the desired Size of the dialog.
60: */
61: public Point getPreferredSize();
62:
63: /**
64: * Called before createControl is called.
65: *
66: * @param feature
67: */
68: void setFeature(Feature feature);
69: }
|