Created a separated 'externaltools' plugin: initial check-in
[phpeclipse.git] / net.sourceforge.phpeclipse.externaltools / src / net / sourceforge / phpdt / externaltools / group / IGroupDialogPage.java
1 package net.sourceforge.phpdt.externaltools.group;
2
3 /**********************************************************************
4 Copyright (c) 2002 IBM Corp. and others. All rights reserved.
5 This file is made available under the terms of the Common Public License v1.0
6 which accompanies this distribution, and is available at
7 http://www.eclipse.org/legal/cpl-v10.html
8  
9 Contributors:
10 **********************************************************************/
11  
12 import org.eclipse.jface.dialogs.IMessageProvider;
13 import org.eclipse.swt.layout.GridData;
14 import org.eclipse.swt.widgets.Button;
15
16 /**
17  * Represents the API for a group of visual components
18  * to access the dialog page that contains it.
19  * <p>
20  * This interface is not intended to be extended
21  * nor implemented by clients.
22  * </p>
23  */
24 public interface IGroupDialogPage extends IMessageProvider {
25         /**
26          * Sets the <code>GridData</code> on the specified button to
27          * be one that is spaced for the current dialog page units.
28          * 
29          * @param button the button to set the <code>GridData</code>
30          * @return the <code>GridData</code> set on the specified button
31          */
32         public GridData setButtonGridData(Button button);
33
34         /**
35          * Sets the message for this page with an indication of what type
36          * of message it is.
37          * <p>
38          * The valid message types are one of <code>NONE</code>, 
39          * <code>INFORMATION</code>, <code>WARNING</code>, or <code>ERROR</code>.
40          * </p>
41          *
42          * @param newMessage the message, or <code>null</code> to clear the message
43          * @param newType the message type
44          */
45         public void setMessage(String newMessage, int newType);
46
47         /**
48          * Updates the page's valid state using the group's
49          * current valid state. This will cause the dialog's
50          * buttons dependent on the page's valid state to
51          * update to reflect the new state.
52          */
53         public void updateValidState();
54         
55         /**
56          * Converts a height in characters to a height in pixels.
57          * 
58          * @param chars the height in characters to be converted
59          * @return the corresponding height in pixels
60          */
61         public int convertHeightHint(int chars);
62 }