--- a/lib/browser/GraphBrowser/AWTFontMetrics.java Wed May 07 16:58:17 2003 +0200
+++ b/lib/browser/GraphBrowser/AWTFontMetrics.java Wed May 07 17:04:45 2003 +0200
@@ -1,3 +1,14 @@
+/***************************************************************************
+ Title: GraphBrowser/AWTFontMetrics.java
+ ID: $Id$
+ Author: Gerwin Klein, TU Muenchen
+ Copyright 2003 TU Muenchen
+ License: GPL (GNU GENERAL PUBLIC LICENSE)
+
+ AbstractFontMetrics from the AWT for graphics mode.
+
+***************************************************************************/
+
package GraphBrowser;
import java.awt.FontMetrics;
--- a/lib/browser/GraphBrowser/AbstractFontMetrics.java Wed May 07 16:58:17 2003 +0200
+++ b/lib/browser/GraphBrowser/AbstractFontMetrics.java Wed May 07 17:04:45 2003 +0200
@@ -1,9 +1,19 @@
+/***************************************************************************
+ Title: GraphBrowser/AWTFontMetrics.java
+ ID: $Id$
+ Author: Gerwin Klein, TU Muenchen
+ Copyright 2003 TU Muenchen
+ License: GPL (GNU GENERAL PUBLIC LICENSE)
+
+ AbstractFontMetrics avoids dependency on java.awt.FontMetrics in
+ batch mode.
+
+***************************************************************************/
+
package GraphBrowser;
public interface AbstractFontMetrics {
-
public int stringWidth(String str);
public int getAscent();
public int getDescent();
-
}
--- a/lib/browser/GraphBrowser/Box.java Wed May 07 16:58:17 2003 +0200
+++ b/lib/browser/GraphBrowser/Box.java Wed May 07 17:04:45 2003 +0200
@@ -1,4 +1,14 @@
-// replacement for java.awt.Dimension
+/***************************************************************************
+ Title: GraphBrowser/Box.java
+ ID: $Id$
+ Author: Gerwin Klein, TU Muenchen
+ Copyright 2003 TU Muenchen
+ License: GPL (GNU GENERAL PUBLIC LICENSE)
+
+ A box with width and height. Used instead of java.awt.Dimension for
+ batch mode.
+
+***************************************************************************/
package GraphBrowser;
--- a/lib/browser/GraphBrowser/Console.java Wed May 07 16:58:17 2003 +0200
+++ b/lib/browser/GraphBrowser/Console.java Wed May 07 17:04:45 2003 +0200
@@ -1,7 +1,7 @@
/***************************************************************************
Title: GraphBrowser/Console.java
ID: $Id$
- Author: Stefan Berghofer, TU Muenchen
+ Author: Gerwin Klein, TU Muenchen
License: GPL (GNU GENERAL PUBLIC LICENSE)
This is the graph browser's main class when run as a console application.
@@ -17,14 +17,13 @@
public class Console {
Graph g;
- // TreeBrowser tb;
String gfname;
public Console(String name) {
gfname = name;
}
- public void PS(String fname,boolean printable) throws IOException {
+ public void PS(String fname, boolean printable) throws IOException {
g.layout(null);
g.PS(fname,printable);
}
@@ -33,30 +32,24 @@
try {
TreeNode tn = new TreeNode("Root", "", -1, true);
g = new Graph(is, tn);
-
- // gv = new GraphView(new Graph(is, tn), null, null);
- // tb = new TreeBrowser(tn, gv, font);
- // gv.setTreeBrowser(tb);
- // Vector v = new Vector(10,10);
- // tn.collapsedDirectories(v);
- // gv.collapseDir(v);
} catch (IOException exn) {
System.err.println("\nI/O error while reading graph file.");
} catch (ParseError exn) {
System.err.println("\nParse error in graph file:");
System.err.println(exn.getMessage());
- System.err.println("\nSyntax:\n<vertexname> <vertexID> <dirname> [ + ] <path> [ < | > ] [ <vertexID> [ ... [ <vertexID> ] ... ] ] ;");
+ System.err.println("\nSyntax:\n<vertexname> <vertexID> <dirname> [ + ] <path> "+
+ "[ < | > ] [ <vertexID> [ ... [ <vertexID> ] ... ] ] ;");
}
}
public static void main(String[] args) {
try {
if (args.length <= 1) {
- System.err.println("Graph and output file expected");
+ System.err.println("Graph and output file expected.");
return;
}
+
Console console=new Console(args[0]);
-
InputStream is=new FileInputStream(args[0]);
console.initBrowser(is);
is.close();
@@ -76,4 +69,3 @@
}
}
}
-
--- a/lib/browser/GraphBrowser/DefaultFontMetrics.java Wed May 07 16:58:17 2003 +0200
+++ b/lib/browser/GraphBrowser/DefaultFontMetrics.java Wed May 07 17:04:45 2003 +0200
@@ -5,7 +5,7 @@
License: GPL (GNU GENERAL PUBLIC LICENSE)
Default font metrics which is used when no graphics context
- is available.
+ is available (batch mode).
***************************************************************************/
package GraphBrowser;