KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
14  * Minimal interface to a message provider. Used for dialog pages which can
15  * provide a message with an icon.
16  *
17  * @since 2.0
18  */

19 public interface IMessageProvider {
20     /**
21      * Constant for a regular message (value 0).
22      * <p>
23      * Typically this indicates that the message should be shown without an
24      * icon.
25      * </p>
26      */

27     public final static int NONE = 0;
28
29     /**
30      * Constant for an info message (value 1).
31      */

32     public final static int INFORMATION = 1;
33
34     /**
35      * Constant for a warning message (value 2).
36      */

37     public final static int WARNING = 2;
38
39     /**
40      * Constant for an error message (value 3).
41      */

42     public final static int ERROR = 3;
43
44     /**
45      * Returns the current message for this message provider.
46      * <p>
47      * A message provides instruction or information to the user.
48      * </p>
49      *
50      * @return the message, or <code>null</code> if none
51      */

52     public String JavaDoc getMessage();
53
54     /**
55      * Returns a value indicating if the message is a an information message, a
56      * warning message, or an error message.
57      * <p>
58      * Returns one of <code>NONE</code>,<code>INFORMATION</code>,
59      * <code>WARNING</code>, or <code>ERROR</code>.
60      * </p>
61      *
62      * @return the message type
63      */

64     public int getMessageType();
65 }
66
Popular Tags