Source Code Cross Referenced for JGraphpadAboutDialog.java in  » Graphic-Library » jgraphpad » com » jgraph » pad » dialog » 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 » Graphic Library » jgraphpad » com.jgraph.pad.dialog 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* 
002:         * $Id: JGraphpadAboutDialog.java,v 1.4 2007/05/24 13:12:26 gaudenz Exp $
003:         * Copyright (c) 2001-2005, Gaudenz Alder
004:         * 
005:         * All rights reserved.
006:         * 
007:         * See LICENSE file for license details. If you are unable to locate
008:         * this file please contact info (at) jgraph (dot) com.
009:         */
010:        package com.jgraph.pad.dialog;
011:
012:        import java.awt.BorderLayout;
013:        import java.awt.event.ActionEvent;
014:        import java.awt.event.ActionListener;
015:        import java.awt.event.KeyEvent;
016:
017:        import javax.swing.BorderFactory;
018:        import javax.swing.ImageIcon;
019:        import javax.swing.JButton;
020:        import javax.swing.JComponent;
021:        import javax.swing.JDialog;
022:        import javax.swing.JPanel;
023:        import javax.swing.JRootPane;
024:        import javax.swing.JTabbedPane;
025:        import javax.swing.JTextArea;
026:        import javax.swing.KeyStroke;
027:
028:        import org.jgraph.JGraph;
029:
030:        import com.jgraph.JGraphpad;
031:        import com.jgraph.editor.JGraphEditorResources;
032:
033:        /**
034:         * About dialog for the JGraphpad application.
035:         */
036:        public class JGraphpadAboutDialog extends JGraphpadDialog {
037:
038:            /**
039:             * Defines the text used in the copyright tab.
040:             */
041:            protected static final String COPYRIGHT = "JGraphpad Pro\n"
042:                    + "Copyright (C) 2001-2005 by Gaudenz Alder\n"
043:                    + JGraphpad.VERSION + "\n" + JGraph.VERSION;
044:
045:            /**
046:             * Defines the text used in the credits tab.
047:             */
048:            protected static final String CREDITS = "Third-party libraries used:\n"
049:                    + "Batik\n"
050:                    + "BeanShell\n"
051:                    + "EPSGraphics\n"
052:                    + "iText\n"
053:                    + "L2FProd\n" + "Looks\n";
054:
055:            /**
056:             * Constructs a new about dialog using the specified icon.
057:             * 
058:             * @param icon
059:             *            The icon to display in the dialog header.
060:             */
061:            public JGraphpadAboutDialog(ImageIcon icon) {
062:                super ("About JGraphpad Pro",
063:                        "For more information visit http://www.jgraph.com/",
064:                        icon);
065:                setSize(640, 480);
066:
067:                // Adds OK button to close window
068:                JButton okButton = new JButton(JGraphEditorResources
069:                        .getString("OK"));
070:                addButtons(new JButton[] { okButton });
071:                okButton.addActionListener(new ActionListener() {
072:                    public void actionPerformed(ActionEvent e) {
073:                        setVisible(false);
074:                    }
075:                });
076:
077:                // Sets default button for enter key
078:                getRootPane().setDefaultButton(okButton);
079:            }
080:
081:            /**
082:             * Overrides {@link JGraphpadDialog#createContent()} to provide the actual
083:             * content of the dialog.
084:             * 
085:             * @return Returns the content of the about dialog.
086:             */
087:            protected JComponent createContent() {
088:                JPanel panel = new JPanel();
089:                panel.setLayout(new BorderLayout());
090:                panel.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));
091:                JTabbedPane tabbedPane = new JTabbedPane();
092:
093:                // Adds the copyright tab
094:                JTextArea copyright = new JTextArea();
095:                copyright.setOpaque(false);
096:                copyright
097:                        .setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
098:                copyright.setText(COPYRIGHT);
099:                tabbedPane.addTab(JGraphEditorResources.getString("Copyright"),
100:                        copyright);
101:
102:                // Adds the credits tab
103:                JTextArea credits = new JTextArea();
104:                credits.setOpaque(false);
105:                credits.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
106:                credits.setText(CREDITS);
107:                tabbedPane.addTab(JGraphEditorResources.getString("Credits"),
108:                        credits);
109:
110:                panel.add(tabbedPane, BorderLayout.CENTER);
111:                return panel;
112:            }
113:
114:            /**
115:             * Overrides {@link JDialog#createRootPane()} to return a root pane that
116:             * hides the window when the user presses the ESCAPE key.O
117:             */
118:            protected JRootPane createRootPane() {
119:                KeyStroke stroke = KeyStroke
120:                        .getKeyStroke(KeyEvent.VK_ESCAPE, 0);
121:                JRootPane rootPane = new JRootPane();
122:                rootPane.registerKeyboardAction(new ActionListener() {
123:                    public void actionPerformed(ActionEvent actionEvent) {
124:                        setVisible(false);
125:                    }
126:                }, stroke, JComponent.WHEN_IN_FOCUSED_WINDOW);
127:                return rootPane;
128:            }
129:
130:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.