Mercurial > projects > dwt2
comparison org.eclipse.jface/src/org/eclipse/jface/preference/IPreferencePage.d @ 12:bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:23:29 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
11:43904fec5dca | 12:bc29606a740c |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2000, 2006 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module org.eclipse.jface.preference.IPreferencePage; | |
14 | |
15 import java.lang.all; | |
16 | |
17 import org.eclipse.jface.preference.IPreferencePageContainer; | |
18 | |
19 import org.eclipse.swt.graphics.Point; | |
20 import org.eclipse.jface.dialogs.IDialogPage; | |
21 | |
22 /** | |
23 * An interface for a preference page. This interface | |
24 * is used primarily by the page's container | |
25 */ | |
26 public interface IPreferencePage : IDialogPage { | |
27 | |
28 /** | |
29 * Computes a size for this page's UI component. | |
30 * | |
31 * @return the size of the preference page encoded as | |
32 * <code>new Point(width,height)</code>, or | |
33 * <code>(0,0)</code> if the page doesn't currently have any UI component | |
34 */ | |
35 public Point computeSize(); | |
36 | |
37 /** | |
38 * Returns whether this dialog page is in a valid state. | |
39 * | |
40 * @return <code>true</code> if the page is in a valid state, | |
41 * and <code>false</code> if invalid | |
42 */ | |
43 public bool isValid(); | |
44 | |
45 /** | |
46 * Checks whether it is alright to leave this page. | |
47 * | |
48 * @return <code>false</code> to abort page flipping and the | |
49 * have the current page remain visible, and <code>true</code> | |
50 * to allow the page flip | |
51 */ | |
52 public bool okToLeave(); | |
53 | |
54 /** | |
55 * Notifies that the container of this preference page has been canceled. | |
56 * | |
57 * @return <code>false</code> to abort the container's cancel | |
58 * procedure and <code>true</code> to allow the cancel to happen | |
59 */ | |
60 public bool performCancel(); | |
61 | |
62 /** | |
63 * Notifies that the OK button of this page's container has been pressed. | |
64 * | |
65 * @return <code>false</code> to abort the container's OK | |
66 * processing and <code>true</code> to allow the OK to happen | |
67 */ | |
68 public bool performOk(); | |
69 | |
70 /** | |
71 * Sets or clears the container of this page. | |
72 * | |
73 * @param preferencePageContainer the preference page container, or <code>null</code> | |
74 */ | |
75 public void setContainer(IPreferencePageContainer preferencePageContainer); | |
76 | |
77 /** | |
78 * Sets the size of this page's UI component. | |
79 * | |
80 * @param size the size of the preference page encoded as | |
81 * <code>new Point(width,height)</code> | |
82 */ | |
83 public void setSize(Point size); | |
84 } |