Source Code Cross Referenced for JADDecompilerSettingsDialog.java in  » IDE » tIDE » tide » exttools » jad_decompiler » 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 » IDE » tIDE » tide.exttools.jad_decompiler 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package tide.exttools.jad_decompiler;
002:
003:        import javax.swing.text.JTextComponent;
004:        import tide.project.*;
005:        import tide.editor.*;
006:        import javax.swing.*;
007:        import java.awt.*;
008:        import java.awt.event.*;
009:        import javax.swing.border.*;
010:        import java.util.*;
011:        import java.io.*;
012:        import snow.utils.*;
013:        import snow.utils.storage.*;
014:        import snow.utils.gui.*;
015:
016:        /** JAD is not perfect.
017:         *   example: EventQueue.class => unknown opcodes, ...
018:         */
019:        public class JADDecompilerSettingsDialog extends JDialog {
020:            private final FileField jadPath = new FileField("", false,
021:                    "Please specify the jad executable",
022:                    JFileChooser.FILES_ONLY);
023:
024:            private final JCheckBox applyJadToClassFilesCB = new JCheckBox(
025:                    "Apply jad on lib classes per default (instead of viewing bytecode)",
026:                    false);
027:            public boolean dialogWasAccepted = false;
028:
029:            public final static String defaultJadLocation = "c:/java/jad/jad.exe";
030:            public final static String homepage = "http://www.kpdus.com/jad.html";
031:
032:            public JADDecompilerSettingsDialog(final JFrame parent,
033:                    final ProjectSettings settings) {
034:                super (parent, "JAD Decompiler", true);
035:
036:                JTextComponent ta = GUIUtils
037:                        .createReadOnlyDescriptionArea("JAD is an external tool used to decompile class files."
038:                                + "\r\nIt is available for free on "
039:                                + homepage
040:                                + "\n\nTo use the decompiler, just right-click on class files in the ClassPath tab.");
041:                add(ta, BorderLayout.NORTH);
042:
043:                JPanel inputPanel = new JPanel();
044:                add(inputPanel, BorderLayout.CENTER);
045:                GridLayout3 gl3 = new GridLayout3(2, inputPanel);
046:                gl3.addSeparator();
047:
048:                gl3.add("JAD application");
049:                gl3.add(jadPath);
050:                jadPath.setPath(settings.getProperty("JAD_path",
051:                        defaultJadLocation));
052:                jadPath.offerRememberedGlobalCompletion(
053:                        MainEditorFrame.instance.globalProperties, "knownJADs");
054:                jadPath.setComponentWidth(300);
055:                jadPath.setAutoColorized();
056:                if (SysUtils.is_Windows_OS()) {
057:                    jadPath.allowedExtensions.add("exe");
058:                    jadPath.fileTypeDescription = "Windows executables";
059:                }
060:
061:                gl3.addTitleSeparator("Options");
062:                gl3.add("");
063:                gl3.add(applyJadToClassFilesCB);
064:                applyJadToClassFilesCB.setSelected(settings.getBooleanProperty(
065:                        "JAD_applyJadToClassFilesCB", false));
066:
067:                CloseControlPanel ccp = new CloseControlPanel(this , true, true,
068:                        "Ok");
069:                add(ccp, BorderLayout.SOUTH);
070:
071:                pack();
072:                this .setLocationRelativeTo(parent);
073:                this .setVisible(true); // MODAL => waits
074:
075:                if (ccp.getWasCancelled())
076:                    return;
077:                dialogWasAccepted = true;
078:
079:                // save settings
080:                settings.setProperty("JAD_path", jadPath.getPath()
081:                        .getAbsolutePath());
082:                settings.setBooleanProperty("JAD_applyJadToClassFilesCB",
083:                        applyJadToClassFilesCB.isSelected());
084:
085:                jadPath.rememberPathForGlobalCompletion(
086:                        MainEditorFrame.instance.globalProperties, "knownJADs");
087:
088:            }
089:
090:            /** @return true if Lint4j path is present.
091:              Used to detect if a setup dialog should be shown when starting the tool (if not found).
092:             */
093:            public static boolean isConfigured() {
094:                ProjectSettings actualProject = MainEditorFrame.instance
095:                        .getActualProject();
096:                return new File(actualProject.getProperty("JAD_path",
097:                        defaultJadLocation)).exists();
098:            }
099:
100:            /*test  public static void main(String[] aa)
101:             {
102:             JFrame f = new JFrame("Test");
103:             f.setDefaultCloseOperation(f.EXIT_ON_CLOSE);
104:             ProjectSettings props = new ProjectSettings();
105:             new JADDecompilerSettingsDialog(f, props);
106:             System.exit(0);
107:             }*/
108:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.