コード例 #1
0
 private ImagePanel getGraph1Panel() {
   if (graph1Panel == null && graph1RootPanel != null) {
     int width = graph1RootPanel.getWidth();
     int height = graph1RootPanel.getHeight();
     SimpleImage img = new SimpleImage(width, height);
     img.fillBackground(0, 0, 0);
     graph1Panel = new ImagePanel(img, 0, 0, graph1RootPanel.getWidth());
     graph1RootPanel.add(graph1Panel, BorderLayout.CENTER);
     graph1RootPanel.getParent().validate();
     graph1RootPanel.repaint();
   }
   return graph1Panel;
 }
コード例 #2
0
 private FlamePanel getPoolPreviewFlamePanel() {
   if (poolFlamePreviewFlamePanel == null && poolFlamePreviewPnl != null) {
     int width = poolFlamePreviewPnl.getWidth();
     int height = poolFlamePreviewPnl.getHeight();
     SimpleImage img = new SimpleImage(width, height);
     img.fillBackground(0, 0, 0);
     poolFlamePreviewFlamePanel =
         new FlamePanel(prefs, img, 0, 0, poolFlamePreviewPnl.getWidth(), poolFlameHolder, null);
     poolFlamePreviewFlamePanel.setRenderWidth(640);
     poolFlamePreviewFlamePanel.setRenderHeight(480);
     poolFlamePreviewFlamePanel.setDrawTriangles(false);
     poolFlamePreviewPnl.add(poolFlamePreviewFlamePanel, BorderLayout.CENTER);
     poolFlamePreviewPnl.getParent().validate();
     poolFlamePreviewPnl.repaint();
   }
   return poolFlamePreviewFlamePanel;
 }
コード例 #3
0
 private FlamePanel getFlamePanel() {
   if (flamePanel == null && flameRootPanel != null) {
     int borderWidth = flameRootPanel.getBorder().getBorderInsets(flameRootPanel).left;
     int width = flameRootPanel.getWidth() - borderWidth;
     int height = flameRootPanel.getHeight() - borderWidth;
     if (width < 16 || height < 16) return null;
     SimpleImage img = new SimpleImage(width, height);
     img.fillBackground(0, 0, 0);
     flamePanel =
         new FlamePanel(prefs, img, 0, 0, flameRootPanel.getWidth() - borderWidth, null, null);
     flamePanel.setRenderWidth(640);
     flamePanel.setRenderHeight(480);
     flameRootPanel.add(flamePanel, BorderLayout.CENTER);
     flameRootPanel.getParent().validate();
     flameRootPanel.repaint();
   }
   flamePanel.setFlameHolder(renderThread);
   return flamePanel;
 }