001: /*******************************************************************************
002: * Copyright (c) 2000, 2006 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.jface.dialogs;
011:
012: import org.eclipse.jface.resource.ImageDescriptor;
013: import org.eclipse.swt.graphics.Image;
014: import org.eclipse.swt.widgets.Composite;
015: import org.eclipse.swt.widgets.Control;
016:
017: /**
018: * Interface for a page in a multi-page dialog.
019: */
020: public interface IDialogPage {
021: /**
022: * Creates the top level control for this dialog
023: * page under the given parent composite.
024: * <p>
025: * Implementors are responsible for ensuring that
026: * the created control can be accessed via <code>getControl</code>
027: * </p>
028: *
029: * @param parent the parent composite
030: */
031: public void createControl(Composite parent);
032:
033: /**
034: * Disposes the SWT resources allocated by this
035: * dialog page.
036: */
037: public void dispose();
038:
039: /**
040: * Returns the top level control for this dialog page.
041: * <p>
042: * May return <code>null</code> if the control
043: * has not been created yet.
044: * </p>
045: *
046: * @return the top level control or <code>null</code>
047: */
048: public Control getControl();
049:
050: /**
051: * Returns this dialog page's description text.
052: *
053: * @return the description text for this dialog page,
054: * or <code>null</code> if none
055: */
056: public String getDescription();
057:
058: /**
059: * Returns the current error message for this dialog page.
060: * May be <code>null</code> to indicate no error message.
061: * <p>
062: * An error message should describe some error state,
063: * as opposed to a message which may simply provide instruction
064: * or information to the user.
065: * </p>
066: *
067: * @return the error message, or <code>null</code> if none
068: */
069: public String getErrorMessage();
070:
071: /**
072: * Returns this dialog page's image.
073: *
074: * @return the image for this dialog page, or <code>null</code>
075: * if none
076: */
077: public Image getImage();
078:
079: /**
080: * Returns the current message for this wizard page.
081: * <p>
082: * A message provides instruction or information to the
083: * user, as opposed to an error message which should
084: * describe some error state.
085: * </p>
086: *
087: * @return the message, or <code>null</code> if none
088: */
089: public String getMessage();
090:
091: /**
092: * Returns this dialog page's title.
093: *
094: * @return the title of this dialog page,
095: * or <code>null</code> if none
096: */
097: public String getTitle();
098:
099: /**
100: * Notifies that help has been requested for this dialog page.
101: */
102: public void performHelp();
103:
104: /**
105: * Sets this dialog page's description text.
106: *
107: * @param description the description text for this dialog
108: * page, or <code>null</code> if none
109: */
110: public void setDescription(String description);
111:
112: /**
113: * Sets this dialog page's image.
114: *
115: * @param image the image for this dialog page,
116: * or <code>null</code> if none
117: */
118: public void setImageDescriptor(ImageDescriptor image);
119:
120: /**
121: * Set this dialog page's title.
122: *
123: * @param title the title of this dialog page,
124: * or <code>null</code> if none
125: */
126: public void setTitle(String title);
127:
128: /**
129: * Sets the visibility of this dialog page.
130: *
131: * @param visible <code>true</code> to make this page visible,
132: * and <code>false</code> to hide it
133: */
134: public void setVisible(boolean visible);
135: }
|