Source Code Cross Referenced for JideOptionPane.java in  » Swing-Library » jide-common » com » jidesoft » dialog » 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 » Swing Library » jide common » com.jidesoft.dialog 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * @(#)JideOptionPane.java 3/27/2006
003:         *
004:         * Copyright 2002 - 2006 JIDE Software Inc. All rights reserved.
005:         */
006:
007:        package com.jidesoft.dialog;
008:
009:        import javax.swing.*;
010:
011:        /**
012:         * <code>JideOptionPane</code> is an enhanced version of JOptionPane.
013:         * <p/>
014:         * This component is still in beta, thus we didn't include the UIDefault needed by this component into LookAndFeelFactory by default.
015:         * If you want to use it, please refer to JideOptionPaneDemo's getDemoPanel method where we add all necessary UIDefaults
016:         * using UIDefaultCustomizer.
017:         */
018:        public class JideOptionPane extends JOptionPane {
019:            private Object _title;
020:            private Object _details;
021:            //    private boolean _bannerVisible = true;
022:
023:            /**
024:             * Bound property name for <code>details</code>.
025:             */
026:            public static final String DETAILS_PROPERTY = "details";
027:
028:            /**
029:             * Bound property name for <code>title</code>.
030:             */
031:            public static final String TITLE_PROPERTY = "title";
032:
033:            public JideOptionPane() {
034:            }
035:
036:            public JideOptionPane(Object message) {
037:                super (message);
038:            }
039:
040:            public JideOptionPane(Object message, int messageType) {
041:                super (message, messageType);
042:            }
043:
044:            public JideOptionPane(Object message, int messageType,
045:                    int optionType) {
046:                super (message, messageType, optionType);
047:            }
048:
049:            public JideOptionPane(Object message, int messageType,
050:                    int optionType, Icon icon) {
051:                super (message, messageType, optionType, icon);
052:            }
053:
054:            public JideOptionPane(Object message, int messageType,
055:                    int optionType, Icon icon, Object[] options) {
056:                super (message, messageType, optionType, icon, options);
057:            }
058:
059:            public JideOptionPane(Object message, int messageType,
060:                    int optionType, Icon icon, Object[] options,
061:                    Object initialValue) {
062:                super (message, messageType, optionType, icon, options,
063:                        initialValue);
064:            }
065:
066:            public static final int CLOSE_OPTION = 3;
067:
068:            /**
069:             * Overrides the method in JOptionPane to allow a new option - CLOSE_OPTION.
070:             *
071:             * @param newType
072:             */
073:            @Override
074:            public void setOptionType(int newType) {
075:                if (newType != DEFAULT_OPTION && newType != YES_NO_OPTION
076:                        && newType != YES_NO_CANCEL_OPTION
077:                        && newType != OK_CANCEL_OPTION
078:                        && newType != CLOSE_OPTION)
079:                    throw new RuntimeException(
080:                            "JOptionPane: option type must be one of JOptionPane.DEFAULT_OPTION, JOptionPane.YES_NO_OPTION, JOptionPane.YES_NO_CANCEL_OPTION or JOptionPane.OK_CANCEL_OPTION");
081:
082:                int oldType = optionType;
083:
084:                optionType = newType;
085:                firePropertyChange(OPTION_TYPE_PROPERTY, oldType, optionType);
086:            }
087:
088:            /**
089:             * Sets the details object. The object can be a string or a component. If it is a string,
090:             * it will be put into a JTextArea. If it is a component, it will be used directly.
091:             * As long as the value is not null, a "Details" button will be added to button panel
092:             * allowing you to show or hide the details panel.
093:             *
094:             * @param details
095:             */
096:            public void setDetails(Object details) {
097:                Object oldDetails = _details;
098:                _details = details;
099:                firePropertyChange(DETAILS_PROPERTY, oldDetails, _details);
100:            }
101:
102:            public Object getDetails() {
103:                return _details;
104:            }
105:
106:            public Object getTitle() {
107:                return _title;
108:            }
109:
110:            public void setTitle(Object title) {
111:                Object old = _title;
112:                _title = title;
113:                firePropertyChange(TITLE_PROPERTY, old, _title);
114:            }
115:
116:            //    public boolean isBannerVisible() {
117:            //        return _bannerVisible;
118:            //    }
119:            //
120:            //    public void setBannerVisible(boolean bannerVisible) {
121:            //        _bannerVisible = bannerVisible;
122:            //    }
123:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.