[Jarspy-commits] CVS: JarSpy/src/com/ociweb/jarspy/gui JarSpyGUI.java,1.45,1.46
Status: Beta
Brought to you by:
brown_j
|
From: Jeff B. <br...@us...> - 2003-01-03 00:09:33
|
Update of /cvsroot/jarspy/JarSpy/src/com/ociweb/jarspy/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv14953/src/com/ociweb/jarspy/gui
Modified Files:
JarSpyGUI.java
Log Message:
allow file to be passed on command line
Index: JarSpyGUI.java
===================================================================
RCS file: /cvsroot/jarspy/JarSpy/src/com/ociweb/jarspy/gui/JarSpyGUI.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** JarSpyGUI.java 25 Dec 2002 02:50:25 -0000 1.45
--- JarSpyGUI.java 3 Jan 2003 00:09:29 -0000 1.46
***************
*** 95,99 ****
private JSplitPane splitter = null;
! public JarSpyGUI() {
super("JarSpy");
classDetailPanel = new ClassDetailsPanel(this);
--- 95,99 ----
private JSplitPane splitter = null;
! public JarSpyGUI(String initialFileToOpen) {
super("JarSpy");
classDetailPanel = new ClassDetailsPanel(this);
***************
*** 160,167 ****
splitter.setDividerLocation(dividerLocation);
! String pathToMostRecentJar = jarSpyPreferences.getMostRecentJarFile();
! if (pathToMostRecentJar != null) {
try {
! File jarFile = new File(pathToMostRecentJar);
if (jarFile.exists()) {
setFile(jarFile);
--- 160,171 ----
splitter.setDividerLocation(dividerLocation);
! if(initialFileToOpen == null) {
! // if a file path was not passed on the command line...
! initialFileToOpen = jarSpyPreferences.getMostRecentJarFile();
! }
!
! if (initialFileToOpen != null) {
try {
! File jarFile = new File(initialFileToOpen);
if (jarFile.exists()) {
setFile(jarFile);
***************
*** 170,173 ****
--- 174,178 ----
}
}
+
setVisible(true);
new Splasher(this, new JarSpyInfoPanel(), 4500).start();
***************
*** 176,202 ****
private void createActions() {
actions.put(ActionNames.OPEN_ARCHIVE_ACTION,
! new OpenArchiveAction(this));
actions.put(ActionNames.EXIT_ACTION,
! new ExitAction(this));
actions.put(ActionNames.EXTRACT_ARCHIVE_ACTION,
! new ExtractArchiveAction(this, jarInspector));
actions.put(ActionNames.VIEW_MANIFEST_ACTION,
! new ViewManifestAction(this, jarInspector));
actions.put(ActionNames.ABOUT_ACTION,
! new AboutAction(this));
actions.put(ActionNames.DECOMPILE_ACTION,
! new DecompileAction(this, jarInspector));
actions.put(ActionNames.VIEW_JAR_CONTENTS_ACTION,
! new ViewJarContentsAction(this));
actions.put(ActionNames.SHOW_JAR_LIST_VIEW,
! new ChangeJarViewerComponentAction(this,
! ActionNames.SHOW_JAR_LIST_VIEW,
! classList,
! "/com/ociweb/jarspy/gui/images/list_mode.gif"));
actions.put(ActionNames.SHOW_JAR_TREE_VIEW,
! new ChangeJarViewerComponentAction(this,
! ActionNames.SHOW_JAR_TREE_VIEW,
! classTree,
! "/com/ociweb/jarspy/gui/images/tree_mode.gif"));
}
--- 181,207 ----
private void createActions() {
actions.put(ActionNames.OPEN_ARCHIVE_ACTION,
! new OpenArchiveAction(this));
actions.put(ActionNames.EXIT_ACTION,
! new ExitAction(this));
actions.put(ActionNames.EXTRACT_ARCHIVE_ACTION,
! new ExtractArchiveAction(this, jarInspector));
actions.put(ActionNames.VIEW_MANIFEST_ACTION,
! new ViewManifestAction(this, jarInspector));
actions.put(ActionNames.ABOUT_ACTION,
! new AboutAction(this));
actions.put(ActionNames.DECOMPILE_ACTION,
! new DecompileAction(this, jarInspector));
actions.put(ActionNames.VIEW_JAR_CONTENTS_ACTION,
! new ViewJarContentsAction(this));
actions.put(ActionNames.SHOW_JAR_LIST_VIEW,
! new ChangeJarViewerComponentAction(this,
! ActionNames.SHOW_JAR_LIST_VIEW,
! classList,
! "/com/ociweb/jarspy/gui/images/list_mode.gif"));
actions.put(ActionNames.SHOW_JAR_TREE_VIEW,
! new ChangeJarViewerComponentAction(this,
! ActionNames.SHOW_JAR_TREE_VIEW,
! classTree,
! "/com/ociweb/jarspy/gui/images/tree_mode.gif"));
}
***************
*** 439,445 ****
} catch (ClassNotFoundException e) {
JOptionPane.showMessageDialog(null,
! "JarSpy requires Java Runtime 1.3 or greater.",
! "Incompatible VM",
! JOptionPane.ERROR_MESSAGE);
System.exit(0);
}
--- 444,450 ----
} catch (ClassNotFoundException e) {
JOptionPane.showMessageDialog(null,
! "JarSpy requires Java Runtime 1.3 or greater.",
! "Incompatible VM",
! JOptionPane.ERROR_MESSAGE);
System.exit(0);
}
***************
*** 450,454 ****
Class.forName(kunststoffLAFClassName);
UIManager.installLookAndFeel("Kunststoff",
! kunststoffLAFClassName);
} catch (Exception e) {
e.printStackTrace();
--- 455,459 ----
Class.forName(kunststoffLAFClassName);
UIManager.installLookAndFeel("Kunststoff",
! kunststoffLAFClassName);
} catch (Exception e) {
e.printStackTrace();
***************
*** 460,469 ****
Class.forName(metouiaLAFClassName);
UIManager.installLookAndFeel("Metouia",
! metouiaLAFClassName);
} catch (Exception e) {
e.printStackTrace();
}
! new JarSpyGUI();
}
}
--- 465,474 ----
Class.forName(metouiaLAFClassName);
UIManager.installLookAndFeel("Metouia",
! metouiaLAFClassName);
} catch (Exception e) {
e.printStackTrace();
}
! new JarSpyGUI(a.length > 0 ? a[0] : null);
}
}
|