use of org.jwildfire.create.tina.swing.flamepanel.FlamePanel in project JWildfire by thargor6.
the class IFlamesController method getBaseFlamePreviewPanel.
private FlamePanel getBaseFlamePreviewPanel() {
if (baseFlamePreviewPanel == null) {
int width = baseFlamePreviewRootPnl.getWidth();
int height = baseFlamePreviewRootPnl.getHeight();
SimpleImage img = new SimpleImage(width, height);
img.fillBackground(0, 0, 0);
baseFlamePreviewPanel = new FlamePanel(prefs, img, 0, 0, baseFlamePreviewRootPnl.getWidth(), this, null);
ResolutionProfile resProfile = getResolutionProfile();
baseFlamePreviewPanel.setRenderWidth(resProfile.getWidth());
baseFlamePreviewPanel.setRenderHeight(resProfile.getHeight());
baseFlamePreviewPanel.setFocusable(true);
baseFlamePreviewRootPnl.add(baseFlamePreviewPanel, BorderLayout.CENTER);
baseFlamePreviewRootPnl.getParent().validate();
baseFlamePreviewRootPnl.repaint();
baseFlamePreviewPanel.requestFocusInWindow();
}
return baseFlamePreviewPanel;
}
use of org.jwildfire.create.tina.swing.flamepanel.FlamePanel in project JWildfire by thargor6.
the class DancingFractalsController method getFlamePanel.
private FlamePanel getFlamePanel() {
if (flamePanel == null) {
// flameRootPanel can't be 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;
}
use of org.jwildfire.create.tina.swing.flamepanel.FlamePanel in project JWildfire by thargor6.
the class DancingFractalsController method borderSizeSlider_changed.
public void borderSizeSlider_changed() {
int value = borderSizeSlider.getValue();
int currValue = flameRootPanel.getBorder().getBorderInsets(flameRootPanel).left;
if (currValue != value) {
flameRootPanel.setBorder(new EmptyBorder(0, 0, value, value));
if (flamePanel != null) {
FlamePanel oldFlamePanel = flamePanel;
flamePanel = null;
flameRootPanel.remove(oldFlamePanel);
flameRootPanel.getParent().validate();
flameRootPanel.repaint();
}
}
}
use of org.jwildfire.create.tina.swing.flamepanel.FlamePanel in project JWildfire by thargor6.
the class DancingFractalsController method getPoolPreviewFlamePanel.
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;
}
use of org.jwildfire.create.tina.swing.flamepanel.FlamePanel in project JWildfire by thargor6.
the class BatchRendererController method getBatchPreviewFlamePanel.
private FlamePanel getBatchPreviewFlamePanel() {
if (batchPreviewFlamePanel == null) {
int width = data.batchPreviewRootPanel.getWidth();
int height = data.batchPreviewRootPanel.getHeight();
SimpleImage img = new SimpleImage(width, height);
img.fillBackground(0, 0, 0);
batchPreviewFlamePanel = new FlamePanel(prefs, img, 0, 0, data.batchPreviewRootPanel.getWidth(), getBatchRenderPreviewFlameHolder(), null);
ResolutionProfile resProfile = getBatchRenderResolutionProfile();
batchPreviewFlamePanel.setRenderWidth(resProfile.getWidth());
batchPreviewFlamePanel.setRenderHeight(resProfile.getHeight());
batchPreviewFlamePanel.setDrawTriangles(false);
data.batchPreviewRootPanel.add(batchPreviewFlamePanel, BorderLayout.CENTER);
data.batchPreviewRootPanel.getParent().validate();
data.batchPreviewRootPanel.repaint();
}
return batchPreviewFlamePanel;
}
Aggregations