Source Code Cross Referenced for DiagramPropertiesDialog.java in  » Web-Framework » argun » biz » hammurapi » web » diagrameditor » 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 » argun » biz.hammurapi.web.diagrameditor 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * argun 1.0
003:         * Web 2.0 delivery framework 
004:         * Copyright (C) 2007  Hammurapi Group
005:         *
006:         * This program is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation; either
009:         * version 2 of the License, or (at your option) any later version.
010:         *
011:         * This program is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         * Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public
017:         * License along with this library; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
019:         *
020:         * URL: http://www.hammurapi.biz
021:         * e-Mail: support@hammurapi.biz 
022:         */
023:        package biz.hammurapi.web.diagrameditor;
024:
025:        import java.awt.GridBagConstraints;
026:        import java.awt.GridBagLayout;
027:        import java.awt.Insets;
028:        import java.awt.event.ActionEvent;
029:        import java.awt.event.ActionListener;
030:
031:        import javax.swing.JButton;
032:        import javax.swing.JEditorPane;
033:        import javax.swing.JFrame;
034:        import javax.swing.JLabel;
035:        import javax.swing.JScrollPane;
036:        import javax.swing.JTabbedPane;
037:        import javax.swing.JTextField;
038:        import javax.swing.JTextPane;
039:
040:        /**
041:         * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI
042:         * Builder, which is free for non-commercial use. If Jigloo is being used
043:         * commercially (ie, by a corporation, company or business for any purpose
044:         * whatever) then you should purchase a license for each developer using Jigloo.
045:         * Please visit www.cloudgarden.com for details. Use of Jigloo implies
046:         * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN
047:         * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR
048:         * ANY CORPORATE OR COMMERCIAL PURPOSE.
049:         */
050:        public class DiagramPropertiesDialog extends javax.swing.JDialog {
051:            private JButton okButton;
052:
053:            private JButton cancelButton;
054:
055:            private JLabel nameLabel;
056:
057:            private JEditorPane descriptionEditorPane;
058:
059:            private JScrollPane descriptionScrollPane;
060:
061:            private JTabbedPane tabbedPanel;
062:
063:            private JTextField nameField;
064:
065:            private DiagramEditorApplet applet;
066:
067:            public DiagramPropertiesDialog(JFrame frame,
068:                    DiagramEditorApplet applet) {
069:                super (frame);
070:                this .applet = applet;
071:                initGUI();
072:                nameField.setText(applet.getFileName());
073:                descriptionEditorPane.setText(applet.getFileDescription());
074:            }
075:
076:            private void initGUI() {
077:                try {
078:                    GridBagLayout this Layout = new GridBagLayout();
079:                    this Layout.rowWeights = new double[] { 0.0, 0.1, 0.0 };
080:                    this Layout.rowHeights = new int[] { 32, 303, 7 };
081:                    this Layout.columnWeights = new double[] { 0.0, 0.0, 0.0,
082:                            0.1, 0.0 };
083:                    this Layout.columnWidths = new int[] { 45, 85, 42, 20, 7 };
084:                    getContentPane().setLayout(this Layout);
085:                    this .setName("Properties");
086:                    this .setModal(true);
087:                    this .setTitle("Properties");
088:                    this .setFocusable(false);
089:                    {
090:                        nameField = new JTextField();
091:                        getContentPane().add(
092:                                nameField,
093:                                new GridBagConstraints(1, 0, 4, 1, 0.0, 0.0,
094:                                        GridBagConstraints.WEST,
095:                                        GridBagConstraints.HORIZONTAL,
096:                                        new Insets(0, 0, 0, 0), 0, 0));
097:                        nameField.setText("Step name");
098:                        nameField.setSize(200, 20);
099:                    }
100:                    {
101:                        okButton = new JButton();
102:                        getContentPane().add(
103:                                okButton,
104:                                new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0,
105:                                        GridBagConstraints.EAST,
106:                                        GridBagConstraints.NONE, new Insets(3,
107:                                                0, 3, 5), 0, 0));
108:                        okButton.setText("OK");
109:                        okButton.addActionListener(new ActionListener() {
110:                            public void actionPerformed(ActionEvent evt) {
111:                                okButtonActionPerformed(evt);
112:                            }
113:                        });
114:                    }
115:                    {
116:                        cancelButton = new JButton();
117:                        getContentPane().add(
118:                                cancelButton,
119:                                new GridBagConstraints(4, 2, 1, 1, 0.0, 0.0,
120:                                        GridBagConstraints.WEST,
121:                                        GridBagConstraints.NONE, new Insets(3,
122:                                                0, 3, 3), 0, 0));
123:                        cancelButton.setText("Cancel");
124:                        cancelButton.addActionListener(new ActionListener() {
125:                            public void actionPerformed(ActionEvent evt) {
126:                                cancelButtonActionPerformed(evt);
127:                            }
128:                        });
129:                    }
130:                    {
131:                        tabbedPanel = new JTabbedPane();
132:                        getContentPane().add(
133:                                tabbedPanel,
134:                                new GridBagConstraints(0, 1, 5, 1, 0.0, 0.0,
135:                                        GridBagConstraints.NORTHWEST,
136:                                        GridBagConstraints.BOTH, new Insets(0,
137:                                                0, 0, 0), 0, 0));
138:                        {
139:                            descriptionScrollPane = new JScrollPane();
140:                            tabbedPanel.addTab("Description", null,
141:                                    descriptionScrollPane, null);
142:                            descriptionScrollPane
143:                                    .setPreferredSize(new java.awt.Dimension(
144:                                            360, 159));
145:                            descriptionScrollPane.setAutoscrolls(true);
146:                            {
147:                                descriptionEditorPane = new JTextPane();
148:                                descriptionScrollPane
149:                                        .setViewportView(descriptionEditorPane);
150:                                descriptionEditorPane.setText("Description");
151:                                descriptionEditorPane
152:                                        .setPreferredSize(new java.awt.Dimension(
153:                                                411, 284));
154:                            }
155:                        }
156:                    }
157:                    {
158:                        nameLabel = new JLabel();
159:                        getContentPane().add(
160:                                nameLabel,
161:                                new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
162:                                        GridBagConstraints.CENTER,
163:                                        GridBagConstraints.NONE, new Insets(0,
164:                                                0, 0, 5), 0, 0));
165:                        nameLabel.setText("Name");
166:                    }
167:                    this .setSize(500, 400);
168:                } catch (Exception e) {
169:                    e.printStackTrace();
170:                }
171:            }
172:
173:            private void okButtonActionPerformed(ActionEvent evt) {
174:                applet.setFileName(nameField.getText());
175:                applet.setFileDescription(descriptionEditorPane.getText());
176:                cancelButtonActionPerformed(evt);
177:            }
178:
179:            private void cancelButtonActionPerformed(ActionEvent evt) {
180:                setVisible(false);
181:                dispose();
182:            }
183:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.