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

Quick Search    Search Deep

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

java.lang.Object
  extended byvirtuoso.asaph.util.render.LineLayout
      extended byvirtuoso.asaph.util.render.PlainTextLineLayout

public class PlainTextLineLayout
extends LineLayout

LineLayout for monospaced plain text.


Field Summary
private  boolean compressNarrowLines_
           
private  int indentSpaces_
           
private  boolean showComments_
           
private  int top_
           
 
Fields inherited from class virtuoso.asaph.util.render.LineLayout
 
Constructor Summary
PlainTextLineLayout(int top, virtuoso.asaph.model.SongLine line, virtuoso.asaph.model.ChordSystem chordSystem, virtuoso.asaph.model.types.Interval transpose, boolean showComments, int blockIndent, int indentSpaces, boolean compressNarrowLines)
          Constructor
 
Method Summary
protected  java.lang.String generateFillerString(float width)
          Subclasses may override this to generate filler text
 float getChordBaseline()
          Get the chord baseline position as a distance below the top
protected  float getChordDelayOffset()
          Subclasses must implement this to provide the offset for delayed chords
protected  float getChordWidth(java.lang.String str)
          Subclasses must implement this to provide the size of a chord string
protected  float getCommentWidth(java.lang.String str)
          Subclasses must implement this to provide the size of a comment string
 float getLineBottom()
          Get the position of the bottom of the line
protected  float getLineIndentWidth()
          Subclasses must implement this to provide the size of a line indent
 float getLineTop()
          Get the position of the top of the line
protected  float getMinChordSpacing()
          Subclasses must implement this to provide the minimum chord spacing
 float getTextBaseline()
          Get the text baseline position as a distance below the top
protected  float getTextWidth(java.lang.String str)
          Subclasses must implement this to provide the size of a text string
protected  java.lang.String modifyCommentString(java.lang.String comment)
          Subclasses may override this to munge a comment string
 
Methods inherited from class virtuoso.asaph.util.render.LineLayout
build, generateChordString, getChordFragmentCount, getChordFragments, getChordsLineLeft, getChordsLineRight, getLineWidth, getNthChordFragment, getNthTextFragment, getTextFragmentCount, getTextFragments, getTextLineLeft, getTextLineRight, hasChords, hasText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

showComments_

private boolean showComments_

indentSpaces_

private int indentSpaces_

compressNarrowLines_

private boolean compressNarrowLines_

top_

private int top_
Constructor Detail

PlainTextLineLayout

public PlainTextLineLayout(int top,
                           virtuoso.asaph.model.SongLine line,
                           virtuoso.asaph.model.ChordSystem chordSystem,
                           virtuoso.asaph.model.types.Interval transpose,
                           boolean showComments,
                           int blockIndent,
                           int indentSpaces,
                           boolean compressNarrowLines)
Constructor

Method Detail

getLineTop

public float getLineTop()
Get the position of the top of the line

Specified by:
getLineTop in class LineLayout

getChordBaseline

public float getChordBaseline()
Get the chord baseline position as a distance below the top

Specified by:
getChordBaseline in class LineLayout

getTextBaseline

public float getTextBaseline()
Get the text baseline position as a distance below the top

Specified by:
getTextBaseline in class LineLayout

getLineBottom

public float getLineBottom()
Get the position of the bottom of the line

Specified by:
getLineBottom in class LineLayout

getChordDelayOffset

protected float getChordDelayOffset()
Subclasses must implement this to provide the offset for delayed chords

Specified by:
getChordDelayOffset in class LineLayout

getMinChordSpacing

protected float getMinChordSpacing()
Subclasses must implement this to provide the minimum chord spacing

Specified by:
getMinChordSpacing in class LineLayout

getLineIndentWidth

protected float getLineIndentWidth()
Subclasses must implement this to provide the size of a line indent

Specified by:
getLineIndentWidth in class LineLayout

getTextWidth

protected float getTextWidth(java.lang.String str)
Subclasses must implement this to provide the size of a text string

Specified by:
getTextWidth in class LineLayout

getCommentWidth

protected float getCommentWidth(java.lang.String str)
Subclasses must implement this to provide the size of a comment string

Specified by:
getCommentWidth in class LineLayout

getChordWidth

protected float getChordWidth(java.lang.String str)
Subclasses must implement this to provide the size of a chord string

Specified by:
getChordWidth in class LineLayout

modifyCommentString

protected java.lang.String modifyCommentString(java.lang.String comment)
Subclasses may override this to munge a comment string

Overrides:
modifyCommentString in class LineLayout

generateFillerString

protected java.lang.String generateFillerString(float width)
Subclasses may override this to generate filler text

Overrides:
generateFillerString in class LineLayout