|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IMessageManager
This interface provides for managing typed messages in a form. Typed messages are messages associated with a type that indicates their severity (error, warning, information). The interface is responsible for:
To use it in a form, do the following:
addMessage method.This interface should only be referenced. It must not be implemented or extended.
IMessageProvider,
IManagedForm| Method Summary | |
|---|---|
void |
addMessage(java.lang.Object key,
java.lang.String messageText,
java.lang.Object data,
int type)
Adds a general message that is not associated with any decorated field. |
void |
addMessage(java.lang.Object key,
java.lang.String messageText,
java.lang.Object data,
int type,
Control control)
Adds a message that should be associated with the provided control. |
java.lang.String |
createSummary(IMessage[] messages)
When message manager is used in context of a form, and there are hyperlink listeners for messages in the header, the hyperlink event will carry an object of type IMessage[] as an href. |
int |
getDecorationPosition()
Returns the currently used decoration position for all control messages. |
IMessagePrefixProvider |
getMessagePrefixProvider()
|
boolean |
isAutoUpdate()
Tests whether the form will be automatically updated when messages are added or removed. |
void |
removeAllMessages()
Removes all the local field messages and all the general container messages. |
void |
removeMessage(java.lang.Object key)
Removes the general message with the provided key. |
void |
removeMessage(java.lang.Object key,
Control control)
Removes a keyed message associated with the provided control. |
void |
removeMessages()
Removes all the general messages. |
void |
removeMessages(Control control)
Removes all the messages associated with the provided control. |
void |
setAutoUpdate(boolean enabled)
Controls whether the form is automatically updated when messages are added or removed. |
void |
setDecorationPosition(int position)
Message manager uses SWT.LEFT|SWT.BOTTOM for the default decoration position. |
void |
setMessagePrefixProvider(IMessagePrefixProvider provider)
Sets the alternative message prefix provider. |
void |
update()
Updates the message container with the messages currently in the manager. |
| Method Detail |
|---|
void addMessage(java.lang.Object key,
java.lang.String messageText,
java.lang.Object data,
int type)
key - a unique message key that will be used to look the message up
latermessageText - the message to adddata - an object for application use (can be null)type - the message type as defined in IMessageProvider.
void addMessage(java.lang.Object key,
java.lang.String messageText,
java.lang.Object data,
int type,
Control control)
key - the unique message keymessageText - the message to adddata - an object for application use (can be null)type - the message typecontrol - the control to associate the message withvoid removeMessage(java.lang.Object key)
key - the key of the message to removevoid removeMessages()
void removeMessage(java.lang.Object key,
Control control)
key - the id of the message to removecontrol - the control the message is associated withvoid removeMessages(Control control)
control - the control the messages are associated withvoid removeAllMessages()
void update()
setAutoUpdate(boolean)void setAutoUpdate(boolean enabled)
enabled - sets the state of the automatic updateboolean isAutoUpdate()
true if auto update is active, false
otherwise.void setMessagePrefixProvider(IMessagePrefixProvider provider)
provider - the new prefix provider or null to turn the
prefix generation off.IMessagePrefixProvider getMessagePrefixProvider()
null if prefixes
are not generated.void setDecorationPosition(int position)
position - the decoration positionControlDecorationint getDecorationPosition()
java.lang.String createSummary(IMessage[] messages)
IMessage[] as an href. You can use
this method to create a summary text from this array consistent with the
tool tip used by the form header.
messages - an array of messages
Form.addMessageHyperlinkListener(org.eclipse.ui.forms.events.IHyperlinkListener)
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.