~ubuntu-branches/ubuntu/karmic/tuxguitar/karmic

« back to all changes in this revision

Viewing changes to TuxGuitar-lilypond/src/org/herac/tuxguitar/io/lilypond/LilypondSongExporter.java

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2008-06-19 00:30:30 UTC
  • mfrom: (1.1.1 upstream) (2.1.3 hardy)
  • Revision ID: james.westby@ubuntu.com-20080619003030-agens2gvd5m4dacu
New upstream release (Closes: #481728) also (LP: #176979, #212207)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.herac.tuxguitar.io.lilypond;
 
2
 
 
3
import java.io.OutputStream;
 
4
 
 
5
import org.herac.tuxguitar.io.base.TGFileFormat;
 
6
import org.herac.tuxguitar.io.base.TGSongExporter;
 
7
import org.herac.tuxguitar.song.models.TGSong;
 
8
 
 
9
public class LilypondSongExporter implements TGSongExporter{
 
10
        
 
11
        private LilypondSettings settings;
 
12
        
 
13
        public String getExportName() {
 
14
                return "Lilypond";
 
15
        }
 
16
        
 
17
        public TGFileFormat getFileFormat() {
 
18
                return new TGFileFormat("Lilypond","*.ly");
 
19
        }
 
20
        
 
21
        public boolean configure(boolean setDefaults) {
 
22
                this.settings = (setDefaults ? LilypondSettings.getDefaults() : new LilypondSettingsDialog().open());
 
23
                return (this.settings != null);
 
24
        }
 
25
        
 
26
        public void exportSong(OutputStream stream, TGSong song) {
 
27
                if(this.settings != null){
 
28
                        new LilypondOutputStream(stream,this.settings).writeSong(song);
 
29
                }
 
30
        }
 
31
}
 
 
b'\\ No newline at end of file'