Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

virtuoso.asaph.util.render
Class PlainTextBodyRender  view PlainTextBodyRender download PlainTextBodyRender.java

java.lang.Object
  extended byvirtuoso.asaph.util.render.PlainTextBodyRender

public class PlainTextBodyRender
extends java.lang.Object

Tool that renders the song body as text.


Field Summary
private  int blockSpacing_
           
private  boolean compressNarrowLines_
           
private  int indentSpaces_
           
private  int lineSpacing_
           
private  java.lang.String newline_
           
private  boolean showComments_
           
 
Constructor Summary
PlainTextBodyRender()
          Constructor
 
Method Summary
private  int moveToLine(java.io.Writer writer, int line, int desiredLine)
           
 void setBlockSpacing(int blockSpacing)
          Set block spacing.
 void setCompressNarrowLines(boolean compressNarrowLines)
          Set compress-narrow-lines.
 void setIndentSpaces(int indentSpaces)
          Set indent spacing.
 void setLineSpacing(int lineSpacing)
          Set line spacing.
 void setNewline(java.lang.String newline)
          Set newline.
 void setShowComments(boolean showComments)
          Set show-comments.
 void writeBodyText(java.io.Writer writer, virtuoso.asaph.model.Song song, virtuoso.asaph.model.ChordSystem chordSystem, virtuoso.asaph.model.types.Interval transpose)
          Write song body
private  void writeChordsLine(java.io.Writer writer, LineLayout lineLayout, int hOffset)
           
private  void writeTextLine(java.io.Writer writer, LineLayout lineLayout, int hOffset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

newline_

private java.lang.String newline_

showComments_

private boolean showComments_

indentSpaces_

private int indentSpaces_

lineSpacing_

private int lineSpacing_

blockSpacing_

private int blockSpacing_

compressNarrowLines_

private boolean compressNarrowLines_
Constructor Detail

PlainTextBodyRender

public PlainTextBodyRender()
Constructor

Method Detail

setNewline

public void setNewline(java.lang.String newline)
Set newline. Default is system setting.


setShowComments

public void setShowComments(boolean showComments)
Set show-comments. Default is true.


setCompressNarrowLines

public void setCompressNarrowLines(boolean compressNarrowLines)
Set compress-narrow-lines. Default is true.


setIndentSpaces

public void setIndentSpaces(int indentSpaces)
Set indent spacing. Default is 4.


setLineSpacing

public void setLineSpacing(int lineSpacing)
Set line spacing. Default is 1.


setBlockSpacing

public void setBlockSpacing(int blockSpacing)
Set block spacing. Default is 3.


moveToLine

private int moveToLine(java.io.Writer writer,
                       int line,
                       int desiredLine)
                throws java.io.IOException

writeChordsLine

private void writeChordsLine(java.io.Writer writer,
                             LineLayout lineLayout,
                             int hOffset)
                      throws java.io.IOException

writeTextLine

private void writeTextLine(java.io.Writer writer,
                           LineLayout lineLayout,
                           int hOffset)
                    throws java.io.IOException

writeBodyText

public void writeBodyText(java.io.Writer writer,
                          virtuoso.asaph.model.Song song,
                          virtuoso.asaph.model.ChordSystem chordSystem,
                          virtuoso.asaph.model.types.Interval transpose)
                   throws java.io.IOException
Write song body