KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > dialogs > IDialogPage


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  *******************************************************************************/

11 package org.eclipse.jface.dialogs;
12
13 import org.eclipse.jface.resource.ImageDescriptor;
14 import org.eclipse.swt.graphics.Image;
15 import org.eclipse.swt.widgets.Composite;
16 import org.eclipse.swt.widgets.Control;
17
18 /**
19  * Interface for a page in a multi-page dialog.
20  */

21 public interface IDialogPage {
22     /**
23      * Creates the top level control for this dialog
24      * page under the given parent composite.
25      * <p>
26      * Implementors are responsible for ensuring that
27      * the created control can be accessed via <code>getControl</code>
28      * </p>
29      *
30      * @param parent the parent composite
31      */

32     public void createControl(Composite parent);
33
34     /**
35      * Disposes the SWT resources allocated by this
36      * dialog page.
37      */

38     public void dispose();
39
40     /**
41      * Returns the top level control for this dialog page.
42      * <p>
43      * May return <code>null</code> if the control
44      * has not been created yet.
45      * </p>
46      *
47      * @return the top level control or <code>null</code>
48      */

49     public Control getControl();
50
51     /**
52      * Returns this dialog page's description text.
53      *
54      * @return the description text for this dialog page,
55      * or <code>null</code> if none
56      */

57     public String JavaDoc getDescription();
58
59     /**
60      * Returns the current error message for this dialog page.
61      * May be <code>null</code> to indicate no error message.
62      * <p>
63      * An error message should describe some error state,
64      * as opposed to a message which may simply provide instruction
65      * or information to the user.
66      * </p>
67      *
68      * @return the error message, or <code>null</code> if none
69      */

70     public String JavaDoc getErrorMessage();
71
72     /**
73      * Returns this dialog page's image.
74      *
75      * @return the image for this dialog page, or <code>null</code>
76      * if none
77      */

78     public Image getImage();
79
80     /**
81      * Returns the current message for this wizard page.
82      * <p>
83      * A message provides instruction or information to the
84      * user, as opposed to an error message which should
85      * describe some error state.
86      * </p>
87      *
88      * @return the message, or <code>null</code> if none
89      */

90     public String JavaDoc getMessage();
91
92     /**
93      * Returns this dialog page's title.
94      *
95      * @return the title of this dialog page,
96      * or <code>null</code> if none
97      */

98     public String JavaDoc getTitle();
99
100     /**
101      * Notifies that help has been requested for this dialog page.
102      */

103     public void performHelp();
104
105     /**
106      * Sets this dialog page's description text.
107      *
108      * @param description the description text for this dialog
109      * page, or <code>null</code> if none
110      */

111     public void setDescription(String JavaDoc description);
112
113     /**
114      * Sets this dialog page's image.
115      *
116      * @param image the image for this dialog page,
117      * or <code>null</code> if none
118      */

119     public void setImageDescriptor(ImageDescriptor image);
120
121     /**
122      * Set this dialog page's title.
123      *
124      * @param title the title of this dialog page,
125      * or <code>null</code> if none
126      */

127     public void setTitle(String JavaDoc title);
128
129     /**
130      * Sets the visibility of this dialog page.
131      *
132      * @param visible <code>true</code> to make this page visible,
133      * and <code>false</code> to hide it
134      */

135     public void setVisible(boolean visible);
136 }
137
Popular Tags