Source Code Cross Referenced for JBorderlessButton.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: JBorderlessButton.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.JButton;
013:
014:        /**
015:         * A JButton that maintains its borderless look when the look
016:         * & feel changes.
017:         *
018:         * @author Geert Bevin (gbevin[remove] at uwyn dot com)
019:         * @version $Revision: 3634 $
020:         * @see JButton
021:         * @since 1.0
022:         */
023:        public class JBorderlessButton extends JButton {
024:            private static final long serialVersionUID = 6092380900896756322L;
025:
026:            /**
027:             * Creates a button with no set text or icon.
028:             * @since 1.0
029:             */
030:            public JBorderlessButton() {
031:                super ();
032:                setStyle();
033:            }
034:
035:            /**
036:             * Creates a button with an icon.
037:             *
038:             * @param icon   the Icon image to display on the button
039:             * @since 1.0
040:             */
041:            public JBorderlessButton(Icon icon) {
042:                super (icon);
043:                setStyle();
044:            }
045:
046:            /**
047:             * Creates a button with text.
048:             *
049:             * @param text   the text of the button
050:             * @since 1.0
051:             */
052:            public JBorderlessButton(String text) {
053:                super (text);
054:                setStyle();
055:            }
056:
057:            /**
058:             * Creates a button where properties are taken from the
059:             * Action supplied.
060:             *
061:             * @param a
062:             * @since 1.0
063:             */
064:            public JBorderlessButton(Action a) {
065:                super (a);
066:                setStyle();
067:            }
068:
069:            /**
070:             * Creates a button with initial text and an icon.
071:             *
072:             * @param text   the text of the button.
073:             * @param icon   the Icon image to display on the button
074:             * @since 1.0
075:             */
076:            public JBorderlessButton(String text, Icon icon) {
077:                super (text, icon);
078:                setStyle();
079:            }
080:
081:            /**
082:             * Notification from the UIFactory that the L&F
083:             * has changed. Maintains the borderless look.
084:             *
085:             * @see JButton#updateUI()
086:             * @since 1.0
087:             */
088:            public void updateUI() {
089:                super .updateUI();
090:                setStyle();
091:            }
092:
093:            /**
094:             * Makes this button borderless.
095:             * @since 1.0
096:             */
097:            private void setStyle() {
098:                setBorder(null);
099:            }
100:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.