KickJava   Java API By Example, From Geeks To Geeks.

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


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.swt.widgets.Control;
14
15 /**
16  * This interface computes the prefix of a message that is created in the
17  * context of a control. Since messages are rolled up to the header in the
18  * message manager, it is important to create a prefix to indicate the context
19  * of a message in the form. Typically the prefix is computed by looking at the
20  * label that preceeds the control, if present. Alternative providers may
21  * include other text to further specify the location of the message.
22  *
23  * @see IMessageManager
24  * @see IMessage
25  * @since 3.3
26  */

27 public interface IMessagePrefixProvider {
28     /**
29      * Returns the computed prefix for the provided control.
30      *
31      * @param control
32      * the control to provide the prefix for
33      * @return the computed prefix
34      */

35     String JavaDoc getPrefix(Control control);
36 }
Popular Tags