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.ui.operations;
18:
19: import org.eclipse.core.runtime.IProgressMonitor;
20: import org.eclipse.swt.widgets.Display;
21:
22: /**
23: * Define user interface needs for a for an operation.
24: * @author jgarnett
25: * @since 0.3
26: */
27: public interface IOp {
28: /** <code>EXTENSION_POINT</code> field */
29: public static final String EXTENSION_POINT = "net.refractions.udig.ui.operation"; //$NON-NLS-1$
30:
31: /**
32: * Each operation is called by the frame work in a seperate thread. Interaction with the display must
33: * be done by calling display.asyncExec() and display.syncExec().
34: * <p>
35: * Each operation implementation must define the steps needed to carry
36: * out its function.
37: * <p>
38: * @param target the object that the operation operates on. This parameter will be the same as the type declared
39: * in targetClass of the operation extension. If the enablesFor attribute of the operation extension
40: * is not 1 or undefined then target will be an array of objects of the type declared in targetClass.
41: */
42: public void op(final Display display, final Object target,
43: final IProgressMonitor monitor) throws Exception;
44:
45: }
|