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

Quick Search    Search Deep

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

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

public class Graphics2DLineLayout
extends LineLayout

LineLayout for standard Graphics2D rendering.


Field Summary
private  float chordAscent_
           
private  float chordDelayOffset_
           
private  float chordDescent_
           
private  java.awt.Font chordFont_
           
private  float chordSpace_
           
private  java.awt.Font commentFont_
           
private  float indentWidth_
           
private  float minChordSpacing_
           
private  java.awt.font.FontRenderContext renderContext_
           
private  boolean showComments_
           
private  float textAscent_
           
private  float textDescent_
           
private  java.awt.Font textFont_
           
private  float top_
           
 
Fields inherited from class virtuoso.asaph.util.render.LineLayout
 
Constructor Summary
Graphics2DLineLayout(float top, virtuoso.asaph.model.SongLine line, virtuoso.asaph.model.ChordSystem chordSystem, virtuoso.asaph.model.types.Interval transpose, boolean showComments, int blockIndent, float indentWidth, float chordSpace, boolean compressNarrowLines, java.awt.Font chordFont, java.awt.Font textFont, java.awt.Font commentFont, java.awt.font.FontRenderContext renderContext)
          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

top_

private float top_

showComments_

private boolean showComments_

chordFont_

private java.awt.Font chordFont_

textFont_

private java.awt.Font textFont_

commentFont_

private java.awt.Font commentFont_

renderContext_

private java.awt.font.FontRenderContext renderContext_

chordDelayOffset_

private float chordDelayOffset_

minChordSpacing_

private float minChordSpacing_

indentWidth_

private float indentWidth_

chordSpace_

private float chordSpace_

textAscent_

private float textAscent_

textDescent_

private float textDescent_

chordAscent_

private float chordAscent_

chordDescent_

private float chordDescent_
Constructor Detail

Graphics2DLineLayout

public Graphics2DLineLayout(float top,
                            virtuoso.asaph.model.SongLine line,
                            virtuoso.asaph.model.ChordSystem chordSystem,
                            virtuoso.asaph.model.types.Interval transpose,
                            boolean showComments,
                            int blockIndent,
                            float indentWidth,
                            float chordSpace,
                            boolean compressNarrowLines,
                            java.awt.Font chordFont,
                            java.awt.Font textFont,
                            java.awt.Font commentFont,
                            java.awt.font.FontRenderContext renderContext)
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