use of org.jwildfire.transform.TextTransformer in project JWildfire by thargor6.
the class FlameBrowserController method deleteBtn_clicked.
public void deleteBtn_clicked() {
FlameFlatNode node = getSelectedFlame();
if (node != null) {
try {
if (StandardDialogs.confirm(rootPanel, "Do you really want to permanently delete this flame?")) {
File file = new File(node.getFilename());
if (!file.delete()) {
throw new Exception("Could not delete file");
}
node.setRemoved(false);
ImagePanel pnl = pnlList.get(selectedPnl);
SimpleImage img = pnl.getImage();
TextTransformer txt = new TextTransformer();
txt.setText1("(deleted)");
txt.setAntialiasing(true);
txt.setColor(Color.RED);
txt.setMode(Mode.NORMAL);
txt.setFontStyle(FontStyle.BOLD);
txt.setFontName("Arial");
txt.setFontSize(24);
txt.setHAlign(HAlignment.CENTRE);
txt.setVAlign(VAlignment.CENTRE);
txt.transformImage(img);
pnl.invalidate();
pnl.repaint();
}
} catch (Exception ex) {
errorHandler.handleError(ex);
}
}
}
use of org.jwildfire.transform.TextTransformer in project JWildfire by thargor6.
the class FlamePreviewHelper method showLayerAppendModeIndicator.
private void showLayerAppendModeIndicator(SimpleImage img) {
TextTransformer txt = new TextTransformer();
txt.setText1("layer-append-mode active");
txt.setAntialiasing(true);
txt.setColor(Color.RED);
txt.setMode(Mode.NORMAL);
txt.setFontStyle(FontStyle.BOLD);
txt.setFontName("Arial");
txt.setFontSize(16);
txt.setHAlign(HAlignment.RIGHT);
txt.setVAlign(VAlignment.BOTTOM);
txt.transformImage(img);
}
Aggregations