Source Code Cross Referenced for JAction.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: JAction.java 3634 2007-01-08 21:42:24Z gbevin $
007:         */
008:        package com.uwyn.rife.swing;
009:
010:        import com.uwyn.rife.swing.Command;
011:        import java.awt.event.ActionEvent;
012:        import javax.swing.AbstractAction;
013:        import javax.swing.Action;
014:        import javax.swing.Icon;
015:        import javax.swing.KeyStroke;
016:
017:        public class JAction extends AbstractAction {
018:            private static final long serialVersionUID = 8035921004854064778L;
019:
020:            private Command mCommand = null;
021:
022:            private JAction() {
023:            }
024:
025:            public JAction(Command command, String name) {
026:                this (command, name, null, null, null, null);
027:            }
028:
029:            public JAction(Command command, String name, char mnemonic) {
030:                this (command, name, new Integer(mnemonic), null, null, null);
031:            }
032:
033:            public JAction(Command command, String name, Integer mnemonic) {
034:                this (command, name, mnemonic, null, null, null);
035:            }
036:
037:            public JAction(Command command, String name, char mnemonic,
038:                    KeyStroke accelerator) {
039:                this (command, name, new Integer(mnemonic), accelerator, null,
040:                        null);
041:            }
042:
043:            public JAction(Command command, String name, Integer mnemonic,
044:                    KeyStroke accelerator) {
045:                this (command, name, mnemonic, accelerator, null, null);
046:            }
047:
048:            public JAction(Command command, String name, char mnemonic,
049:                    KeyStroke accelerator, Icon icon) {
050:                this (command, name, new Integer(mnemonic), accelerator, icon,
051:                        null);
052:            }
053:
054:            public JAction(Command command, String name, Integer mnemonic,
055:                    KeyStroke accelerator, Icon icon) {
056:                this (command, name, mnemonic, accelerator, icon, null);
057:            }
058:
059:            public JAction(Command command, Icon icon) {
060:                this (command, null, null, null, icon, null);
061:            }
062:
063:            public JAction(Command command, Icon icon, String shortDescription) {
064:                this (command, null, null, null, icon, shortDescription);
065:            }
066:
067:            public JAction(Command command, String name, char mnemonic,
068:                    KeyStroke accelerator, Icon icon, String shortDescription) {
069:                this (command, name, new Integer(mnemonic), accelerator, icon,
070:                        shortDescription);
071:            }
072:
073:            public JAction(Command command, String name, Integer mnemonic,
074:                    KeyStroke accelerator, Icon icon, String shortDescription) {
075:                super ();
076:
077:                setCommand(command);
078:
079:                if (null != name) {
080:                    setName(name);
081:                }
082:                if (null != mnemonic) {
083:                    setMnemonic(mnemonic);
084:                }
085:                if (null != accelerator) {
086:                    setAccelerator(accelerator);
087:                }
088:                if (null != icon) {
089:                    setIcon(icon);
090:                }
091:                if (null != shortDescription) {
092:                    setShortDescription(shortDescription);
093:                }
094:            }
095:
096:            public void setCommand(Command command) {
097:                mCommand = command;
098:            }
099:
100:            public void setName(String name) {
101:                putValue(Action.NAME, name);
102:            }
103:
104:            public void setMnemonic(char mnemonic) {
105:                setMnemonic(new Integer(mnemonic));
106:            }
107:
108:            public void setMnemonic(Integer mnemonic) {
109:                putValue(Action.MNEMONIC_KEY, mnemonic);
110:            }
111:
112:            public void setAccelerator(KeyStroke accelerator) {
113:                putValue(Action.ACCELERATOR_KEY, accelerator);
114:            }
115:
116:            public void setIcon(Icon icon) {
117:                putValue(Action.SMALL_ICON, icon);
118:            }
119:
120:            public void setShortDescription(String shortDescription) {
121:                putValue(Action.SHORT_DESCRIPTION, shortDescription);
122:            }
123:
124:            public void actionPerformed(ActionEvent e) {
125:                if (null != mCommand) {
126:                    new Thread() {
127:                        public void run() {
128:                            mCommand.execute();
129:                        }
130:                    }.start();
131:                }
132:            }
133:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.