01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jface.dialogs;
11:
12: /**
13: * Minimal interface to a message provider. Used for dialog pages which can
14: * provide a message with an icon.
15: *
16: * @since 2.0
17: */
18: public interface IMessageProvider {
19: /**
20: * Constant for a regular message (value 0).
21: * <p>
22: * Typically this indicates that the message should be shown without an
23: * icon.
24: * </p>
25: */
26: public final static int NONE = 0;
27:
28: /**
29: * Constant for an info message (value 1).
30: */
31: public final static int INFORMATION = 1;
32:
33: /**
34: * Constant for a warning message (value 2).
35: */
36: public final static int WARNING = 2;
37:
38: /**
39: * Constant for an error message (value 3).
40: */
41: public final static int ERROR = 3;
42:
43: /**
44: * Returns the current message for this message provider.
45: * <p>
46: * A message provides instruction or information to the user.
47: * </p>
48: *
49: * @return the message, or <code>null</code> if none
50: */
51: public String getMessage();
52:
53: /**
54: * Returns a value indicating if the message is a an information message, a
55: * warning message, or an error message.
56: * <p>
57: * Returns one of <code>NONE</code>,<code>INFORMATION</code>,
58: * <code>WARNING</code>, or <code>ERROR</code>.
59: * </p>
60: *
61: * @return the message type
62: */
63: public int getMessageType();
64: }
|