Source Code Cross Referenced for Messagebox.java in  » Ajax » zk » org » zkoss » zhtml » 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 » Ajax » zk » org.zkoss.zhtml 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Messagebox.java
002:
003:        {{IS_NOTE
004:        	Purpose:
005:        		
006:        	Description:
007:        		
008:        	History:
009:        		Thu Nov 24 15:09:25     2005, Created by tomyeh
010:        }}IS_NOTE
011:
012:        Copyright (C) 2005 Potix Corporation. All Rights Reserved.
013:
014:        {{IS_RIGHT
015:        	This program is distributed under GPL Version 2.0 in the hope that
016:        	it will be useful, but WITHOUT ANY WARRANTY.
017:        }}IS_RIGHT
018:         */
019:        package org.zkoss.zhtml;
020:
021:        import org.zkoss.mesg.Messages;
022:        import org.zkoss.zk.ui.WebApp;
023:        import org.zkoss.zk.ui.UiException;
024:
025:        /**
026:         * Represents the message box.
027:         *
028:         * <p>You don't create {@link Messagebox} directly. Rather, use {@link #show}.
029:         * 
030:         * <p>A non-XHTML extension.
031:         *
032:         * @author tomyeh
033:         */
034:        public class Messagebox {
035:            /** A symbol consisting of a question mark in a circle. */
036:            public static final String QUESTION = org.zkoss.zul.Messagebox.QUESTION;
037:            /** A symbol consisting of an exclamation point in a triangle with
038:             * a yellow background.
039:             */
040:            public static final String EXCLAMATION = org.zkoss.zul.Messagebox.EXCLAMATION;
041:            /** The same as {@link #EXCLAMATION}.
042:             */
043:            public static final String INFORMATION = EXCLAMATION;
044:            /** A symbol consisting of a white X in a circle with a red background. */
045:            public static final String ERROR = org.zkoss.zul.Messagebox.ERROR;
046:            /** Contains no symbols. */
047:            public static final String NONE = null;
048:
049:            /** A OK button. */
050:            public static final int OK = org.zkoss.zul.Messagebox.OK;
051:            /** A Cancel button. */
052:            public static final int CANCEL = org.zkoss.zul.Messagebox.CANCEL;
053:            /** A Yes button. */
054:            public static final int YES = org.zkoss.zul.Messagebox.YES;
055:            /** A No button. */
056:            public static final int NO = org.zkoss.zul.Messagebox.NO;
057:            /** A Abort button. */
058:            public static final int ABORT = org.zkoss.zul.Messagebox.ABORT;
059:            /** A Retry button. */
060:            public static final int RETRY = org.zkoss.zul.Messagebox.RETRY;
061:            /** A IGNORE button. */
062:            public static final int IGNORE = org.zkoss.zul.Messagebox.IGNORE;
063:
064:            /** Shows a message box and returns what button is pressed.
065:             *
066:             * @param title the title. If null, {@link WebApp#getAppName} is used.
067:             * @param buttons a combination of {@link #OK}, {@link #CANCEL},
068:             * {@link #YES}, {@link #NO}, {@link #ABORT}, {@link #RETRY},
069:             * and {@link #IGNORE}. If zero, {@link #OK} is assumed
070:             * @param icon one of predefined images: {@link #QUESTION},
071:             * {@link #EXCLAMATION}, {@link #ERROR}, {@link #NONE}, or any URI of
072:             * an image.
073:             * @return the button being pressed (one of {@link #OK}, {@link #CANCEL},
074:             * {@link #YES}, {@link #NO}, {@link #ABORT}, {@link #RETRY},
075:             * and {@link #IGNORE}).
076:             */
077:            public static final int show(String message, String title,
078:                    int buttons, String icon) throws InterruptedException {
079:                return org.zkoss.zul.Messagebox.show(message, title, buttons,
080:                        icon);
081:            }
082:
083:            /** Shows a message box and returns what button is pressed.
084:             * A shortcut to show(message, null, OK, INFORMATION).
085:             */
086:            public static final int show(String message)
087:                    throws InterruptedException {
088:                return show(message, null, OK, INFORMATION);
089:            }
090:
091:            /** Shows a message box by specifying a message code, and returns what
092:             * button is pressed.
093:             *
094:             * @param titleCode the message code for the title. If non-positive,
095:             * the default title is used.
096:             */
097:            public static final int show(int messageCode, Object[] args,
098:                    int titleCode, int button, String icon)
099:                    throws InterruptedException {
100:                return show(Messages.get(messageCode, args),
101:                        titleCode > 0 ? Messages.get(titleCode) : null, button,
102:                        icon);
103:            }
104:
105:            /** Shows a message box by specifying a message code, and returns what
106:             * button is pressed.
107:             *
108:             * @param titleCode the message code for the title. If non-positive,
109:             * the default title is used.
110:             */
111:            public static final int show(int messageCode, Object arg,
112:                    int titleCode, int button, String icon)
113:                    throws InterruptedException {
114:                return show(Messages.get(messageCode, arg),
115:                        titleCode > 0 ? Messages.get(titleCode) : null, button,
116:                        icon);
117:            }
118:
119:            /** Shows a message box by specifying a message code, and returns what
120:             * button is pressed.
121:             *
122:             * @param titleCode the message code for the title. If non-positive,
123:             * the default title is used.
124:             */
125:            public static final int show(int messageCode, int titleCode,
126:                    int button, String icon) throws InterruptedException {
127:                return show(Messages.get(messageCode), titleCode > 0 ? Messages
128:                        .get(titleCode) : null, button, icon);
129:            }
130:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.