Java Doc for IMessageManager.java in  » IDE-Eclipse » ui » org » eclipse » ui » forms » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui » org.eclipse.ui.forms 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.forms.IMessageManager

All known Subclasses:   org.eclipse.ui.internal.forms.MessageManager,
IMessageManager
public interface IMessageManager (Code)
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:
  • Bridging the concept of typed messages and control decorations
  • Adding one or more messages per control in a form
  • Rolling the local messages up to the form header
  • Adding one or more general messages to the form header

To use it in a form, do the following:

  1. For each interactive control, add a listener to it to monitor user input
  2. Every time the input changes, validate it. If there is a problem, add a message with a unique key to the manager. If there is already a message with the same key in the manager, its type and message text will be replaced (no duplicates). Note that you add can messages with different keys to the same control to track multiple problems with the user input.
  3. If the problem has been cleared, remove the message using the key (attempting to remove a message that is not in the manager is safe).
  4. If something happens in the form that is not related to any control, use the other addMessage method.

This interface should only be referenced. It must not be implemented or extended.


since:
   3.3
See Also:   IMessageProvider
See Also:   IManagedForm




Method Summary
 voidaddMessage(Object key, String messageText, Object data, int type)
     Adds a general message that is not associated with any decorated field. Note that subsequent calls using the same key will not result in duplicate messages.
 voidaddMessage(Object key, String messageText, Object data, int type, Control control)
     Adds a message that should be associated with the provided control.
 StringcreateSummary(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.
 intgetDecorationPosition()
     Returns the currently used decoration position for all control messages.
 IMessagePrefixProvidergetMessagePrefixProvider()
    
 booleanisAutoUpdate()
     Tests whether the form will be automatically updated when messages are added or removed.
 voidremoveAllMessages()
     Removes all the local field messages and all the general container messages.
 voidremoveMessage(Object key)
     Removes the general message with the provided key.
 voidremoveMessage(Object key, Control control)
     Removes a keyed message associated with the provided control.
 voidremoveMessages()
     Removes all the general messages.
 voidremoveMessages(Control control)
     Removes all the messages associated with the provided control.
 voidsetAutoUpdate(boolean enabled)
     Controls whether the form is automatically updated when messages are added or removed.
 voidsetDecorationPosition(int position)
     Message manager uses SWT.LEFT|SWT.BOTTOM for the default decoration position.
 voidsetMessagePrefixProvider(IMessagePrefixProvider provider)
     Sets the alternative message prefix provider.
 voidupdate()
     Updates the message container with the messages currently in the manager.



Method Detail
addMessage
void addMessage(Object key, String messageText, Object data, int type)(Code)
Adds a general message that is not associated with any decorated field. Note that subsequent calls using the same key will not result in duplicate messages. Instead, the previous message with the same key will be replaced with the new message.
Parameters:
  key - a unique message key that will be used to look the message uplater
Parameters:
  messageText - the message to add
Parameters:
  data - an object for application use (can be null)
Parameters:
  type - the message type as defined in IMessageProvider.



addMessage
void addMessage(Object key, String messageText, Object data, int type, Control control)(Code)
Adds a message that should be associated with the provided control. Note that subsequent calls using the same key will not result in duplicate messages. Instead, the previous message with the same key will be replaced with the new message.
Parameters:
  key - the unique message key
Parameters:
  messageText - the message to add
Parameters:
  data - an object for application use (can be null)
Parameters:
  type - the message type
Parameters:
  control - the control to associate the message with



createSummary
String createSummary(IMessage[] messages)(Code)
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. You can use this method to create a summary text from this array consistent with the tool tip used by the form header.
Parameters:
  messages - an array of messages a textual representation of the messages with one message perline.
See Also:   Form.addMessageHyperlinkListener(org.eclipse.ui.forms.events.IHyperlinkListener)



getDecorationPosition
int getDecorationPosition()(Code)
Returns the currently used decoration position for all control messages. the current decoration position



getMessagePrefixProvider
IMessagePrefixProvider getMessagePrefixProvider()(Code)
the current prefix provider or null if prefixesare not generated.



isAutoUpdate
boolean isAutoUpdate()(Code)
Tests whether the form will be automatically updated when messages are added or removed. true if auto update is active, falseotherwise.



removeAllMessages
void removeAllMessages()(Code)
Removes all the local field messages and all the general container messages.



removeMessage
void removeMessage(Object key)(Code)
Removes the general message with the provided key. Does nothing if message for the key does not exist.
Parameters:
  key - the key of the message to remove



removeMessage
void removeMessage(Object key, Control control)(Code)
Removes a keyed message associated with the provided control. Does nothing if the message for that key does not exist.
Parameters:
  key - the id of the message to remove
Parameters:
  control - the control the message is associated with



removeMessages
void removeMessages()(Code)
Removes all the general messages. If there are local messages associated with controls, the replacement message may show up drawing user's attention to these local messages. Otherwise, the container will clear the message area.



removeMessages
void removeMessages(Control control)(Code)
Removes all the messages associated with the provided control. Does nothing if there are no messages for this control.
Parameters:
  control - the control the messages are associated with



setAutoUpdate
void setAutoUpdate(boolean enabled)(Code)
Controls whether the form is automatically updated when messages are added or removed. By default, auto update is on. Clients can turn it off prior to adding or removing a number of messages as a batch. Turning it back on will trigger an update.
Parameters:
  enabled - sets the state of the automatic update



setDecorationPosition
void setDecorationPosition(int position)(Code)
Message manager uses SWT.LEFT|SWT.BOTTOM for the default decoration position. Use this method to change it.
Parameters:
  position - the decoration position
See Also:   ControlDecoration



setMessagePrefixProvider
void setMessagePrefixProvider(IMessagePrefixProvider provider)(Code)
Sets the alternative message prefix provider. The default prefix provider is set by the manager.
Parameters:
  provider - the new prefix provider or null to turn theprefix generation off.



update
void update()(Code)
Updates the message container with the messages currently in the manager. There are two scenarios in which a client may want to use this method:
  1. When controls previously managed by this manager have been disposed.
  2. When automatic update has been turned off.
In all other situations, the manager will keep the form in sync automatically.
See Also:   IMessageManager.setAutoUpdate(boolean)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.