01: package net.refractions.udig.style.sld;
02:
03: import org.eclipse.jface.dialogs.IDialogPage;
04: import org.eclipse.swt.graphics.Point;
05:
06: public interface IEditorPage extends IDialogPage {
07: /**
08: * Computes a size for this page's UI component.
09: *
10: * @return the size of the preference page encoded as
11: * <code>new Point(width,height)</code>, or
12: * <code>(0,0)</code> if the page doesn't currently have any UI component
13: */
14: public Point computeSize();
15:
16: /**
17: * Returns whether this dialog page is in a valid state.
18: *
19: * @return <code>true</code> if the page is in a valid state,
20: * and <code>false</code> if invalid
21: */
22: public boolean isValid();
23:
24: /**
25: * Checks whether it is alright to leave this page.
26: *
27: * @return <code>false</code> to abort page flipping and the
28: * have the current page remain visible, and <code>true</code>
29: * to allow the page flip
30: */
31: public boolean okToLeave();
32:
33: /**
34: * Notifies that the container of this preference page has been canceled.
35: *
36: * @return <code>false</code> to abort the container's cancel
37: * procedure and <code>true</code> to allow the cancel to happen
38: */
39: public boolean performCancel();
40:
41: /**
42: * Notifies that the OK button of this page's container has been pressed.
43: *
44: * @return <code>false</code> to abort the container's OK
45: * processing and <code>true</code> to allow the OK to happen
46: */
47: public boolean performOk();
48:
49: /**
50: * Executed immediately before an apply action.
51: *
52: */
53: public boolean performApply();
54:
55: /**
56: * Sets the size of this page's UI component.
57: *
58: * @param size the size of the preference page encoded as
59: * <code>new Point(width,height)</code>
60: */
61: public void setSize(Point size);
62:
63: public void setContainer(IEditorPageContainer dialog);
64:
65: public void applyData(Object data);
66:
67: public void refresh();
68:
69: }
|