KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > forms > IMessage


1 /*******************************************************************************
2  * Copyright (c) 2007 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.ui.forms;
12
13 import org.eclipse.jface.dialogs.IMessageProvider;
14 import org.eclipse.swt.widgets.Control;
15
16 /**
17  * This interface encapsulates a single message that can be shown in a form.
18  * Messages can be associated with controls, or be of a general nature.
19  *
20  * @see IMessageManager
21  * @since 3.3
22  */

23 public interface IMessage extends IMessageProvider {
24     /**
25      * Returns the unique message key
26      *
27      * @return the unique message key
28      */

29     Object JavaDoc getKey();
30
31     /**
32      * Returns data for application use
33      *
34      * @return data object
35      */

36     Object JavaDoc getData();
37
38     /**
39      * Returns the control this message is associated with.
40      *
41      * @return the control or <code>null</code> if this is a general message.
42      */

43     Control getControl();
44
45     /**
46      * Messages that are associated with controls can be shown with a prefix
47      * that indicates the origin of the message (e.g. the label preceeding the
48      * control).
49      *
50      * @return the message prefix or <code>null</code> if this is a general
51      * message
52      */

53     String JavaDoc getPrefix();
54 }
Popular Tags