Java Doc for MessageBox.java in  » Web-Framework » ThinWire » thinwire » ui » 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 » Web Framework » ThinWire » thinwire.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   thinwire.ui.MessageBox

MessageBox
final public class MessageBox (Code)
A MessageBox displays a message (or a component) and allows a user to respond.

Example:

 MessageBox.confirm("resources/ngLF/info.png", "ThinWire",
 "Get ready for ThinWire");
 

Keyboard Navigation:
KEY RESPONSE NOTE


author:
   Joshua J. Gertzen




Method Summary
public  voidclose()
     Close the message box.
public static  voidcloseCurrent()
     Closes the current message box.
public static  voidconfirm(String message)
     Display a dialog window with an OK button and message.

Sample usage:

 MessageBox.confirm("Invalid Return by Time\nInvalid Zip Code");
 
For multiple line messages, separate the lines with "\n".
public static  voidconfirm(String title, String message)
     Display a dialog window with an OK button, title and message.

Sample usage:

 MessageBox.confirm("Operator Message", 
 "Invalid Return by Time\nInvalid Zip Code");
 
For multiple line messages, separate the lines with "\n".
public static  voidconfirm(String icon, String title, String message)
     Display a dialog window with an OK button, icon, title and message.

Sample usage:

 MessageBox.confirm("error", "Operator Message", 
 "Invalid Return by Time\nInvalid Zip Code");
 
For multiple line messages, separate the lines with "\n".
public static  intconfirm(String icon, String title, String message, String buttons)
     Display a dialog window with specified buttons, message and icons.

Sample usage:

 MessageBox.confirm("question", "Operator Message",
 "Would you like to shut down the server?", 
 "text1;image1|text2,image2");
 
For multiple line messages, separate the lines with "\n".

The buttons string should specify text and optionally an image for each button. Use a semi-colon to separate the text and image for a button, and a pipe to separate one button's info from that of the next.
e.g.

public static  intconfirm(String icon, String title, Component component, String buttons)
     Display a dialog window with the specified icon, title, component, and buttons.
public  intconfirm()
     Make the MessageBox visible, and then block.
public  StringgetButtons()
     Returns the string that sets all the buttons for the message box.
public  ComponentgetComponent()
     Returns the component for the MessageBox.
public  StringgetIcon()
     Returns the icon for the message box.
public  StringgetText()
     Returns the message in the message box.
public  StringgetTitle()
     Returns the title of the MessageBox.
public  voidsetButtons(String buttons)
     Sets the buttons based on a string.
public  voidsetComponent(Component component)
     Set the component for the MessageBox.

The component will appear in the content panel.
Don't set both a message and a Component.

public  voidsetIcon(String icon)
     Set the icon for the MessageBox.
public  voidsetText(String text)
     Set the message for the MessageBox.

For multiple line messages, separate the lines with "\n".
Don't set both a message and a Component.

public  voidsetTitle(String title)
     Set the title for the MessageBox.
public static  voidshow(String message)
     Display a dialog window without buttons.

Adds the MessageBox to the MessageBox stack on the application instance.
This method will not block.
For multiple line messages, separate the lines with "\n".

public static  voidshow(String title, String message)
     Display a dialog window without buttons.

Adds the MessageBox to the MessageBox stack on the application instance.
This method will not block.
For multiple line messages, separate the lines with "\n".

public static  voidshow(String icon, String title, String message)
     Display a dialog window without buttons.

Adds the MessageBox to the MessageBox stack on the application instance.
This method will not block.
For multiple line messages, separate the lines with "\n".

public  voidshow()
     Makes the MessageBox visible.



Method Detail
close
public void close()(Code)
Close the message box.



closeCurrent
public static void closeCurrent()(Code)
Closes the current message box.



confirm
public static void confirm(String message)(Code)
Display a dialog window with an OK button and message.

Sample usage:

 MessageBox.confirm("Invalid Return by Time\nInvalid Zip Code");
 
For multiple line messages, separate the lines with "\n".
Parameters:
  message - The dialog message, a \n separated sequence of lines.



confirm
public static void confirm(String title, String message)(Code)
Display a dialog window with an OK button, title and message.

Sample usage:

 MessageBox.confirm("Operator Message", 
 "Invalid Return by Time\nInvalid Zip Code");
 
For multiple line messages, separate the lines with "\n".
Parameters:
  title - the dialog title
Parameters:
  message - The dialog message, a \n separated sequence of lines.



confirm
public static void confirm(String icon, String title, String message)(Code)
Display a dialog window with an OK button, icon, title and message.

Sample usage:

 MessageBox.confirm("error", "Operator Message", 
 "Invalid Return by Time\nInvalid Zip Code");
 
For multiple line messages, separate the lines with "\n".
Parameters:
  icon - name of the image file without path info or file extension.
Parameters:
  title - the dialog title
Parameters:
  message - The dialog message, a \n separated sequence of lines.



confirm
public static int confirm(String icon, String title, String message, String buttons)(Code)
Display a dialog window with specified buttons, message and icons.

Sample usage:

 MessageBox.confirm("question", "Operator Message",
 "Would you like to shut down the server?", 
 "text1;image1|text2,image2");
 
For multiple line messages, separate the lines with "\n".

The buttons string should specify text and optionally an image for each button. Use a semi-colon to separate the text and image for a button, and a pipe to separate one button's info from that of the next.
e.g. "text1;image1|text2;image2|......|textk;imagek"

The buttons string can also specify int return values for the buttons.
e.g. "text1;image1;5|text2;image2;17|......|textK;imageK;27"

Warning: Give all of the buttons return values or none of them. If you don't specify return values, a button's return value will depend on the order in which it is added to the dialog. Also, return values must be integers greater than or equal to 0.
Parameters:
  icon - The dialog's icon.
Parameters:
  title - The dialog's title.
Parameters:
  message - The dialog's message.
Parameters:
  buttons - specifies what text and icon each button will have the clicked button's return value




confirm
public static int confirm(String icon, String title, Component component, String buttons)(Code)
Display a dialog window with the specified icon, title, component, and buttons.
Parameters:
  icon - the name of the icon, optional
Parameters:
  title - the MessageBox title
Parameters:
  component - the Component for the content panel.
Parameters:
  buttons - a string specifying the buttons the clicked button's return value



confirm
public int confirm()(Code)
Make the MessageBox visible, and then block. the clicked button's return value



getButtons
public String getButtons()(Code)
Returns the string that sets all the buttons for the message box. the string describing this MessageBox's buttons



getComponent
public Component getComponent()(Code)
Returns the component for the MessageBox. a Component



getIcon
public String getIcon()(Code)
Returns the icon for the message box. the name for the icon for the MessageBox



getText
public String getText()(Code)
Returns the message in the message box. the message in this MessageBox



getTitle
public String getTitle()(Code)
Returns the title of the MessageBox. the title of this MessageBox



setButtons
public void setButtons(String buttons)(Code)
Sets the buttons based on a string.

Example:
 currentMB.setButtons("Delete;ERASE|Activate;STAR|Cancel;CANCEL");
 

Parameters:
  buttons - a String describing the buttons



setComponent
public void setComponent(Component component)(Code)
Set the component for the MessageBox.

The component will appear in the content panel.
Don't set both a message and a Component.
Parameters:
  component - the content for the MessageBox.




setIcon
public void setIcon(String icon)(Code)
Set the icon for the MessageBox. It appears in the top left corner.
Parameters:
  icon - name of the icon



setText
public void setText(String text)(Code)
Set the message for the MessageBox.

For multiple line messages, separate the lines with "\n".
Don't set both a message and a Component.
Parameters:
  text - the message




setTitle
public void setTitle(String title)(Code)
Set the title for the MessageBox.
Parameters:
  title - the MessageBox title



show
public static void show(String message)(Code)
Display a dialog window without buttons.

Adds the MessageBox to the MessageBox stack on the application instance.
This method will not block.
For multiple line messages, separate the lines with "\n".
Parameters:
  message - The dialog message, a \n separated sequence of lines.




show
public static void show(String title, String message)(Code)
Display a dialog window without buttons.

Adds the MessageBox to the MessageBox stack on the application instance.
This method will not block.
For multiple line messages, separate the lines with "\n".
Parameters:
  title - the dialog title
Parameters:
  message - The dialog message, a \n separated sequence of lines.




show
public static void show(String icon, String title, String message)(Code)
Display a dialog window without buttons.

Adds the MessageBox to the MessageBox stack on the application instance.
This method will not block.
For multiple line messages, separate the lines with "\n".
Parameters:
  icon - name of the image file without path info or file extension.
Parameters:
  title - the dialog title
Parameters:
  message - The dialog message, a \n separated sequence of lines.




show
public void show()(Code)
Makes the MessageBox visible.

Adds the MessageBox to the MessageBox stack on the application instance.

This method is non-blocking.




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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