public class Chunk extends Token
| Modifier and Type | Method and Description | 
|---|---|
| static java.awt.Font | deriveSubstFont(java.awt.Font mainFont,
               java.awt.Font candidateFont)Derives a font to match the main font for purposes of
 font substitution. | 
| static java.awt.Font | getSubstFont(int codepoint)Returns the first font which can display a character from
 configured substitution candidates, or null if there is no
 such font. | 
| static float | offsetToX(Chunk chunks,
         int offset)Converts an offset in a chunk list into an x co-ordinate. | 
| static float | paintChunkBackgrounds(Chunk chunks,
                     java.awt.Graphics2D gfx,
                     float x,
                     float y,
                     float lineHeight)Paints the background highlights of a chunk list. | 
| static float | paintChunkList(Chunk chunks,
              java.awt.Graphics2D gfx,
              float x,
              float y,
              boolean glyphVector)Paints a chunk list. | 
| static void | propertiesChanged(IPropertyManager props)Reload internal configuration based on the given properties. | 
| boolean | usedFontSubstitution()Returns true if font substitution was used in the layout of this chunk. | 
| static int | xToOffset(Chunk chunks,
         float x,
         boolean round)Converts an x co-ordinate in a chunk list into an offset. | 
isCommentOrLiteral, stringToToken, tokenToString, toStringpublic static float paintChunkList(Chunk chunks, java.awt.Graphics2D gfx, float x, float y, boolean glyphVector)
chunks - The chunk listgfx - The graphics contextx - The x co-ordinatey - The y co-ordinateglyphVector - true if we want to use glyphVector, false if we
 want to use drawStringpublic static float paintChunkBackgrounds(Chunk chunks, java.awt.Graphics2D gfx, float x, float y, float lineHeight)
chunks - The chunk listgfx - The graphics contextx - The x co-ordinatey - The y co-ordinatepublic static float offsetToX(Chunk chunks, int offset)
chunks - The chunk listoffset - The offsetpublic static int xToOffset(Chunk chunks, float x, boolean round)
chunks - The chunk listx - The x co-ordinateround - Round up to next letter if past the middle of a letter?public static void propertiesChanged(IPropertyManager props)
props - Configuration properties.public static java.awt.Font getSubstFont(int codepoint)
public static java.awt.Font deriveSubstFont(java.awt.Font mainFont,
                                            java.awt.Font candidateFont)
mainFont - Font to derive fromcandidateFont - Font to transformpublic boolean usedFontSubstitution()