Exemple #1
0
 public void imageBegin(int w, int h, int bucketSize)
 {
     if (frame == null)
     {
         frame = new RenderFrame();
         frame.imagePanel.imageBegin(w, h, bucketSize);
         Dimension screenRes = Toolkit.getDefaultToolkit().getScreenSize();
         bool      needFit   = false;
         if (w >= (screenRes.getWidth() - 200) || h >= (screenRes.getHeight() - 200))
         {
             frame.imagePanel.setPreferredSize(new Dimension((int)screenRes.getWidth() - 200, (int)screenRes.getHeight() - 200));
             needFit = true;
         }
         else
         {
             frame.imagePanel.setPreferredSize(new Dimension(w, h));
         }
         frame.pack();
         frame.setLocationRelativeTo(null);
         frame.setVisible(true);
         if (needFit)
         {
             frame.imagePanel.fit();
         }
     }
     else
     {
         frame.imagePanel.imageBegin(w, h, bucketSize);
     }
 }
Exemple #2
0
 public void imageBegin(int w, int h, int bucketSize)
 {
     if (frame == null)
     {
         frame = new RenderFrame();
         frame.imagePanel.imageBegin(w, h, bucketSize);
         Dimension screenRes = Toolkit.getDefaultToolkit().getScreenSize();
         bool needFit = false;
         if (w >= (screenRes.getWidth() - 200) || h >= (screenRes.getHeight() - 200))
         {
             frame.imagePanel.setPreferredSize(new Dimension((int)screenRes.getWidth() - 200, (int)screenRes.getHeight() - 200));
             needFit = true;
         }
         else
             frame.imagePanel.setPreferredSize(new Dimension(w, h));
         frame.pack();
         frame.setLocationRelativeTo(null);
         frame.setVisible(true);
         if (needFit)
             frame.imagePanel.fit();
     }
     else
         frame.imagePanel.imageBegin(w, h, bucketSize);
 }