Source Code Cross Referenced for AntDeployTool.java in  » J2EE » enhydra-IDE-plugin » org » enhydra » kelp » ant » deployer » 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 » J2EE » enhydra IDE plugin » org.enhydra.kelp.ant.deployer 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.enhydra.kelp.ant.deployer;
002:
003:        /**
004:         * <p>Title: </p>
005:         * <p>Description: </p>
006:         * <p>Copyright: Copyright (c) 2003</p>
007:         * <p>Company: </p>
008:         * @author unascribed
009:         * @version 1.0
010:         */
011:
012:        //AddInCore
013:        import org.enhydra.kelp.common.AbstractTool;
014:        import org.enhydra.kelp.common.node.OtterProject;
015:        import org.enhydra.kelp.common.swing.AddinInnerPanel;
016:
017:        //AddInAnt
018:        import org.enhydra.kelp.ant.node.AntProject;
019:        import org.enhydra.kelp.ant.swing.HTMLViewer; //import org.enhydra.kelp.ant.xmlc.AntXMLCBuilder;
020:
021:        //ToolBox
022:        import org.enhydra.tool.common.InnerPanel;
023:        import org.enhydra.tool.common.SwingUtil;
024:        import org.enhydra.tool.common.ButtonPanel;
025:        import org.enhydra.tool.common.event.FirstFocusEvent;
026:        import org.enhydra.tool.common.event.FirstFocusListener;
027:
028:        // Standard imports
029:        import java.io.File;
030:        import java.awt.Dialog;
031:        import java.awt.Frame;
032:        import java.awt.event.ActionListener;
033:        import java.lang.ref.WeakReference;
034:        import java.net.URL;
035:        import java.util.ResourceBundle;
036:
037:        /**
038:         * <p>Title: </p>
039:         * <p>Description: Deploy tool use AntProject for read,write properties and
040:         * AntDeployBuilder for running Deployer. </p>
041:         * <p>Copyright: Copyright (c) 2003</p>
042:         * <p>Company: </p>
043:         * @author Damir Milovic
044:         * @version 1.0
045:         */
046:
047:        public class AntDeployTool extends AbstractTool implements 
048:                FirstFocusListener {
049:
050:            static ResourceBundle addinRes = ResourceBundle
051:                    .getBundle("org.enhydra.kelp.common.Res");
052:            private AntDeployInnerPanel innerPanel = null;
053:            //    private XMLCButtonPanel          buttonPanel = null;
054:            private AntDeployButtonPanel buttonPanel = null;
055:            private WeakReference compileRef = null;
056:
057:            public AntDeployTool() {
058:                super ();
059:                innerPanel = new AntDeployInnerPanel();
060:                buttonPanel = new AntDeployButtonPanel();
061:                innerPanel.addFirstFocusListener(this );
062:            }
063:
064:            public static void main(String[] args) {
065:                SwingUtil.setLookAndFeelToSystem();
066:                AntDeployTool tool = null;
067:                AntProject project = null;
068:                if (args.length > 0) {
069:                    // check path
070:                    File root = new File(args[0]);
071:                    if (!root.exists()) {
072:                        System.err.println("ERROR: directory'" + args[0]
073:                                + "' don't exist!");
074:                        return;
075:                    }
076:                    try {
077:                        project = new AntProject(args[0]);
078:                    } catch (Exception ex) {
079:                        ex.printStackTrace();
080:                        return;
081:                    }
082:
083:                } else {
084:                    return;
085:                    //FIXME TODO get current directory
086:                }
087:
088:                tool = new AntDeployTool();
089:                tool.setProject(project); //DACHA
090:                tool.showDialog(new Frame());
091:                return;
092:            }
093:
094:            /**
095:             * Override
096:             */
097:            public void build() {
098:                ((AntDeployInnerPanel) getInnerPanel()).selectOutputTab();
099:                ((AntDeployInnerPanel) getInnerPanel()).save();
100:                ((AntDeployInnerPanel) getInnerPanel()).clearOutput();
101:                buildImpl();
102:            }
103:
104:            private void buildImpl() {
105:                AntDeployBuilder builder = new AntDeployBuilder(
106:                        ((AntDeployInnerPanel) getInnerPanel())
107:                                .getWriteListeners());
108:                builder.setProject(getProject());
109:                builder.build();
110:            }
111:
112:            public static final String getDefaultTitle() {
113:                return "Deployer";
114:            }
115:
116:            // implements AbstractTool
117:            public String getTitle() {
118:                return AntDeployTool.getDefaultTitle();
119:            }
120:
121:            // implements AbstractTool
122:            public InnerPanel getInnerPanel() {
123:                return innerPanel;
124:            }
125:
126:            // implements AbstractTool
127:            public ButtonPanel getButtonPanel() {
128:                return buttonPanel;
129:            }
130:
131:            public ActionListener createButtonListener() {
132:                return (new AntDeployButtonListener(this ));
133:            }
134:
135:            // overrides AbstractTool
136:            public void setProject(OtterProject project) {
137:                super .setProject(project);
138:                //        setNodes(project.getAllDocuments());
139:            }
140:
141:            // overrides AbstractTool
142:            public void clearAll() {
143:                super .clearAll();
144:                innerPanel.removeFirstFocusListener(this );
145:                if (compileRef != null) {
146:                    compileRef.clear();
147:                }
148:                innerPanel = null;
149:                buttonPanel = null;
150:                compileRef = null;
151:            }
152:
153:            // implements FirstFocusListener
154:            public void onFirstFocus(FirstFocusEvent event) {
155:                /** @todo  */
156:            }
157:
158:            public void showHelp(Dialog parent) {
159:                URL helpURL = this .getClass().getClassLoader().getResource(
160:                        "using_ant_kelp.html");
161:                HTMLViewer.createAndShow(parent, "Kelp Help", helpURL);
162:
163:            }
164:
165:            // implements org.enhydra.kelp.common.tool.AbstractTool
166:            protected String getProgressTitle() {
167:                return addinRes.getString("Deployment_Progress");
168:            }
169:
170:            // implements org.enhydra.kelp.common.tool.AbstractTool
171:            protected AddinInnerPanel getPropertyPanel() {
172:                return innerPanel;
173:            }
174:
175:            protected void back() {
176:                innerPanel.back();
177:            }
178:
179:            protected void next() {
180:                innerPanel.next();
181:            }
182:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.