Source Code Cross Referenced for JBorderlessToggleButton.java in  » Web-Framework » rife-1.6.1 » com » uwyn » rife » swing » 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 » rife 1.6.1 » com.uwyn.rife.swing 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
003:         * Distributed under the terms of either:
004:         * - the common development and distribution license (CDDL), v1.0; or
005:         * - the GNU Lesser General Public License, v2.1 or later
006:         * $Id: JBorderlessToggleButton.java 3634 2007-01-08 21:42:24Z gbevin $
007:         */
008:        package com.uwyn.rife.swing;
009:
010:        import javax.swing.Action;
011:        import javax.swing.Icon;
012:        import javax.swing.JToggleButton;
013:
014:        /**
015:         * A toggle button that maintains its borderless look when
016:         * the look & feel changes.
017:         *
018:         * @author Geert Bevin (gbevin[remove] at uwyn dot com)
019:         * @version $Revision: 3634 $
020:         * @since 1.0
021:         */
022:        public class JBorderlessToggleButton extends JToggleButton {
023:            private static final long serialVersionUID = 6408368895438315474L;
024:
025:            /**
026:             * Creates an initially unselected toggle button
027:             * without setting the text or image.
028:             * @since 1.0
029:             */
030:            public JBorderlessToggleButton() {
031:                super ();
032:                setStyle();
033:            }
034:
035:            /**
036:             * Creates an initially unselected toggle button
037:             * with the specified image but no text.
038:             *
039:             * @param icon   the image that the button should display
040:             * @since 1.0
041:             */
042:            public JBorderlessToggleButton(Icon icon) {
043:                super (icon);
044:                setStyle();
045:            }
046:
047:            /**
048:             * Creates a toggle button with the specified image
049:             * and selection state, but no text.
050:             *
051:             * @param icon     the image that the button should display
052:             * @param selected if true, the button is initially selected;
053:             *                 otherwise, the button is initially unselected
054:             * @since 1.0
055:             */
056:            public JBorderlessToggleButton(Icon icon, boolean selected) {
057:                super (icon, selected);
058:                setStyle();
059:            }
060:
061:            /**
062:             * Creates an unselected toggle button with the specified text.
063:             *
064:             * @param text   the string displayed on the toggle button
065:             * @since 1.0
066:             */
067:            public JBorderlessToggleButton(String text) {
068:                super (text);
069:                setStyle();
070:            }
071:
072:            /**
073:             * Creates a toggle button with the specified text
074:             * and selection state.
075:             *
076:             * @param text     the string displayed on the toggle button
077:             * @param selected if true, the button is initially selected;
078:             *                 otherwise, the button is initially unselected
079:             * @since 1.0
080:             */
081:            public JBorderlessToggleButton(String text, boolean selected) {
082:                super (text, selected);
083:                setStyle();
084:            }
085:
086:            /**
087:             * Creates a toggle button where properties are taken from the
088:             * Action supplied.
089:             *
090:             * @param a
091:             * @since 1.0
092:             */
093:            public JBorderlessToggleButton(Action a) {
094:                super (a);
095:                setStyle();
096:            }
097:
098:            /**
099:             * Creates a toggle button that has the specified text and image,
100:             * and that is initially unselected.
101:             *
102:             * @param text   the string displayed on the button
103:             * @param icon   the image that the button should display
104:             * @since 1.0
105:             */
106:            public JBorderlessToggleButton(String text, Icon icon) {
107:                super (text, icon);
108:                setStyle();
109:            }
110:
111:            /**
112:             * Creates a toggle button with the specified text, image, and
113:             * selection state.
114:             *
115:             * @param text     the text of the toggle button
116:             * @param icon     the image that the button should display
117:             * @param selected if true, the button is initially selected;
118:             *                 otherwise, the button is initially unselected
119:             * @since 1.0
120:             */
121:            public JBorderlessToggleButton(String text, Icon icon,
122:                    boolean selected) {
123:                super (text, icon, selected);
124:                setStyle();
125:            }
126:
127:            /**
128:             * Notification from the UIFactory that the L&F
129:             * has changed. Maintains the borderless look.
130:             *
131:             * @see JToggleButton#updateUI()
132:             * @since 1.0
133:             */
134:            public void updateUI() {
135:                super .updateUI();
136:                setStyle();
137:            }
138:
139:            /**
140:             * Makes this toggle button borderless.
141:             * @since 1.0
142:             */
143:            private void setStyle() {
144:                setBorder(null);
145:            }
146:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.