java.lang.Object
org.gjt.sp.jedit.syntax.Token
org.gjt.sp.jedit.syntax.Chunk
- public class Chunk
- extends Token
A syntax token with extra information required for painting it
on screen.
- Since:
- jEdit 4.1pre1
| Fields inherited from class org.gjt.sp.jedit.syntax.Token |
COMMENT1, COMMENT2, END, highlightBackground, id, ID_COUNT, INTERNAL_FIRST, INTERNAL_LAST, INVALID, KEYWORD1, KEYWORD2, KEYWORD3, LABEL, length, LITERAL1, LITERAL2, METHOD, next, NULL, OPERATOR |
|
Method Summary |
float[] |
getPositions()
|
void |
init(javax.swing.text.Segment seg,
javax.swing.text.TabExpander expander,
float x,
java.awt.font.FontRenderContext fontRenderContext)
|
static float |
offsetToX(Chunk chunks,
int offset)
Converts an offset in a chunk list into an x co-ordinate. |
float |
offsetToX(int offset)
|
static float |
paintChunkBackgrounds(Chunk chunks,
java.awt.Graphics2D gfx,
float x,
float y)
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 int |
xToOffset(Chunk chunks,
float x,
boolean round)
Converts an x co-ordinate in a chunk list into an offset. |
int |
xToOffset(float x,
boolean round)
|
| Methods inherited from class org.gjt.sp.jedit.syntax.Token |
toString |
accessable
public boolean accessable
visible
public boolean visible
initialized
public boolean initialized
monospaced
public boolean monospaced
charWidth
public int charWidth
style
public SyntaxStyle style
background
public java.awt.Color background
width
public float width
gv
public java.awt.font.GlyphVector gv
str
public java.lang.String str
positions
private float[] positions
Chunk
public Chunk(float width,
int offset,
ParserRuleSet rules)
Chunk
public Chunk(byte id,
int offset,
int length,
ParserRuleSet rules,
SyntaxStyle[] styles,
byte defaultID)
paintChunkList
public static float paintChunkList(Chunk chunks,
java.awt.Graphics2D gfx,
float x,
float y,
boolean glyphVector)
- Paints a chunk list.
- Since:
- jEdit 4.2pre1
paintChunkBackgrounds
public static float paintChunkBackgrounds(Chunk chunks,
java.awt.Graphics2D gfx,
float x,
float y)
- Paints the background highlights of a chunk list.
- Since:
- jEdit 4.2pre1
offsetToX
public static float offsetToX(Chunk chunks,
int offset)
- Converts an offset in a chunk list into an x co-ordinate.
- Since:
- jEdit 4.1pre1
xToOffset
public static int xToOffset(Chunk chunks,
float x,
boolean round)
- Converts an x co-ordinate in a chunk list into an offset.
- Since:
- jEdit 4.1pre1
getPositions
public final float[] getPositions()
offsetToX
public final float offsetToX(int offset)
xToOffset
public final int xToOffset(float x,
boolean round)
init
public void init(javax.swing.text.Segment seg,
javax.swing.text.TabExpander expander,
float x,
java.awt.font.FontRenderContext fontRenderContext)