src/share/demo/java2d/J2DBench/src/j2dbench/J2DBench.java

Print this page




  52 import java.awt.BorderLayout;
  53 import java.awt.event.ActionListener;
  54 import java.awt.event.ActionEvent;
  55 import java.awt.event.WindowAdapter;
  56 import java.awt.event.WindowEvent;
  57 import javax.swing.JFrame;
  58 import javax.swing.JButton;
  59 import javax.swing.JPanel;
  60 import javax.swing.BoxLayout;
  61 import javax.swing.JFileChooser;
  62 import javax.swing.JOptionPane;
  63 import java.text.SimpleDateFormat;
  64 import java.util.Date;
  65 
  66 import j2dbench.tests.GraphicsTests;
  67 import j2dbench.tests.ImageTests;
  68 import j2dbench.tests.MiscTests;
  69 import j2dbench.tests.RenderTests;
  70 import j2dbench.tests.PixelTests;
  71 import j2dbench.tests.iio.IIOTests;

  72 import j2dbench.tests.text.TextConstructionTests;
  73 import j2dbench.tests.text.TextMeasureTests;
  74 import j2dbench.tests.text.TextRenderTests;
  75 import j2dbench.tests.text.TextTests;
  76 
  77 public class J2DBench {
  78     static Group progoptroot;
  79 
  80     static Option.Enable verbose;
  81     static Option.Enable printresults;
  82 
  83     static boolean looping = false;
  84 
  85     static JFrame guiFrame;
  86 
  87     static final SimpleDateFormat sdf =
  88         new SimpleDateFormat("MM.dd.yyyy 'at' HH:mm aaa z");
  89 
  90     public static void init() {
  91         progoptroot = new Group("prog", "Program Options");


 182 
 183         System.exit(exitcode);
 184     }
 185 
 186     public static void main(String argv[]) {
 187         init();
 188         TestEnvironment.init();
 189         Result.init();
 190 
 191         Destinations.init();
 192         GraphicsTests.init();
 193         RenderTests.init();
 194         PixelTests.init();
 195         ImageTests.init();
 196         MiscTests.init();
 197         TextTests.init();
 198         TextRenderTests.init();
 199         TextMeasureTests.init();
 200         TextConstructionTests.init();
 201         IIOTests.init();

 202 
 203         boolean gui = true;
 204         boolean showresults = true;
 205         boolean saveresults = true;
 206         String resfilename = null;
 207         String title = null;
 208         String desc = null;
 209         boolean appendres = false;
 210         long requiredLoopTime = 259200000; // 72 hrs * 60 * 60 * 1000
 211         for (int i = 0; i < argv.length; i++) {
 212             String arg = argv[i];
 213             if (arg.equalsIgnoreCase("-list")) {
 214                 PrintWriter pw = new PrintWriter(System.out);
 215                 Node.Iterator iter = Group.root.getRecursiveChildIterator();
 216                 while (iter.hasNext()) {
 217                     Node n = iter.next();
 218                     n.write(pw);
 219                 }
 220                 pw.flush();
 221             } else if (arg.equalsIgnoreCase("-gui") ||




  52 import java.awt.BorderLayout;
  53 import java.awt.event.ActionListener;
  54 import java.awt.event.ActionEvent;
  55 import java.awt.event.WindowAdapter;
  56 import java.awt.event.WindowEvent;
  57 import javax.swing.JFrame;
  58 import javax.swing.JButton;
  59 import javax.swing.JPanel;
  60 import javax.swing.BoxLayout;
  61 import javax.swing.JFileChooser;
  62 import javax.swing.JOptionPane;
  63 import java.text.SimpleDateFormat;
  64 import java.util.Date;
  65 
  66 import j2dbench.tests.GraphicsTests;
  67 import j2dbench.tests.ImageTests;
  68 import j2dbench.tests.MiscTests;
  69 import j2dbench.tests.RenderTests;
  70 import j2dbench.tests.PixelTests;
  71 import j2dbench.tests.iio.IIOTests;
  72 import j2dbench.tests.cmm.CMMTests;
  73 import j2dbench.tests.text.TextConstructionTests;
  74 import j2dbench.tests.text.TextMeasureTests;
  75 import j2dbench.tests.text.TextRenderTests;
  76 import j2dbench.tests.text.TextTests;
  77 
  78 public class J2DBench {
  79     static Group progoptroot;
  80 
  81     static Option.Enable verbose;
  82     static Option.Enable printresults;
  83 
  84     static boolean looping = false;
  85 
  86     static JFrame guiFrame;
  87 
  88     static final SimpleDateFormat sdf =
  89         new SimpleDateFormat("MM.dd.yyyy 'at' HH:mm aaa z");
  90 
  91     public static void init() {
  92         progoptroot = new Group("prog", "Program Options");


 183 
 184         System.exit(exitcode);
 185     }
 186 
 187     public static void main(String argv[]) {
 188         init();
 189         TestEnvironment.init();
 190         Result.init();
 191 
 192         Destinations.init();
 193         GraphicsTests.init();
 194         RenderTests.init();
 195         PixelTests.init();
 196         ImageTests.init();
 197         MiscTests.init();
 198         TextTests.init();
 199         TextRenderTests.init();
 200         TextMeasureTests.init();
 201         TextConstructionTests.init();
 202         IIOTests.init();
 203         CMMTests.init();
 204 
 205         boolean gui = true;
 206         boolean showresults = true;
 207         boolean saveresults = true;
 208         String resfilename = null;
 209         String title = null;
 210         String desc = null;
 211         boolean appendres = false;
 212         long requiredLoopTime = 259200000; // 72 hrs * 60 * 60 * 1000
 213         for (int i = 0; i < argv.length; i++) {
 214             String arg = argv[i];
 215             if (arg.equalsIgnoreCase("-list")) {
 216                 PrintWriter pw = new PrintWriter(System.out);
 217                 Node.Iterator iter = Group.root.getRecursiveChildIterator();
 218                 while (iter.hasNext()) {
 219                     Node n = iter.next();
 220                     n.write(pw);
 221                 }
 222                 pw.flush();
 223             } else if (arg.equalsIgnoreCase("-gui") ||