Search in sources :

Example 1 with FlameMovieWriter

use of org.jwildfire.create.tina.io.FlameMovieWriter in project JWildfire by thargor6.

the class TinaSWFAnimatorController method movieToClipboardButton_clicked.

public void movieToClipboardButton_clicked() {
    try {
        updateMovieFields();
        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
        String xml = new FlameMovieWriter().getMovieXML(currMovie);
        StringSelection data = new StringSelection(xml);
        clipboard.setContents(data, data);
    } catch (Throwable ex) {
        errorHandler.handleError(ex);
    }
}
Also used : FlameMovieWriter(org.jwildfire.create.tina.io.FlameMovieWriter) Clipboard(java.awt.datatransfer.Clipboard) StringSelection(java.awt.datatransfer.StringSelection)

Example 2 with FlameMovieWriter

use of org.jwildfire.create.tina.io.FlameMovieWriter in project JWildfire by thargor6.

the class TinaSWFAnimatorController method movieToDiscButton_clicked.

public void movieToDiscButton_clicked() {
    updateMovieFields();
    try {
        JFileChooser chooser = new JWFMovieFileChooser(prefs);
        if (prefs.getOutputJWFMoviePath() != null) {
            try {
                chooser.setCurrentDirectory(new File(prefs.getOutputJWFMoviePath()));
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
        if (chooser.showSaveDialog(swfAnimatorFlamesPanel) == JFileChooser.APPROVE_OPTION) {
            File file = chooser.getSelectedFile();
            new FlameMovieWriter().writeFlame(currMovie, file.getAbsolutePath());
            prefs.setLastOutputJWFMovieFile(file);
        }
    } catch (Throwable ex) {
        errorHandler.handleError(ex);
    }
}
Also used : JFileChooser(javax.swing.JFileChooser) FlameMovieWriter(org.jwildfire.create.tina.io.FlameMovieWriter) File(java.io.File)

Aggregations

FlameMovieWriter (org.jwildfire.create.tina.io.FlameMovieWriter)2 Clipboard (java.awt.datatransfer.Clipboard)1 StringSelection (java.awt.datatransfer.StringSelection)1 File (java.io.File)1 JFileChooser (javax.swing.JFileChooser)1