|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gjt.sp.jedit.syntax.Token
org.gjt.sp.jedit.syntax.Chunk
public class Chunk
A syntax token with extra information required for painting it on screen.
| Field Summary | |
|---|---|
boolean |
accessable
|
boolean |
initialized
|
SyntaxStyle |
style
|
float |
width
|
| Fields inherited from class org.gjt.sp.jedit.syntax.Token |
|---|
COMMENT1, COMMENT2, COMMENT3, COMMENT4, DIGIT, END, FUNCTION, id, ID_COUNT, INVALID, KEYWORD1, KEYWORD2, KEYWORD3, KEYWORD4, LABEL, length, LITERAL1, LITERAL2, LITERAL3, LITERAL4, MARKUP, next, NULL, offset, OPERATOR, rules, TOKEN_TYPES |
| Constructor Summary | |
|---|---|
Chunk(byte id,
int offset,
int length,
ParserRuleSet rules,
SyntaxStyle[] styles,
byte defaultID)
|
|
Chunk(float width,
int offset,
ParserRuleSet rules)
|
|
| Method Summary | |
|---|---|
void |
init(javax.swing.text.Segment seg,
javax.swing.text.TabExpander expander,
float x,
java.awt.font.FontRenderContext fontRenderContext,
int physicalLineOffset)
|
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,
int 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. |
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 |
|---|
stringToToken, tokenToString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public boolean accessable
public boolean initialized
public SyntaxStyle style
public float width
| Constructor Detail |
|---|
public Chunk(float width,
int offset,
ParserRuleSet rules)
public Chunk(byte id,
int offset,
int length,
ParserRuleSet rules,
SyntaxStyle[] styles,
byte defaultID)
| Method Detail |
|---|
public 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 drawString
public static float paintChunkBackgrounds(Chunk chunks,
java.awt.Graphics2D gfx,
float x,
float y,
int lineHeight)
chunks - The chunk listgfx - The graphics contextx - The x co-ordinatey - The y co-ordinate
public static float offsetToX(Chunk chunks,
int offset)
chunks - The chunk listoffset - The offset
public 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 final float offsetToX(int offset)
public final int xToOffset(float x,
boolean round)
public void init(javax.swing.text.Segment seg,
javax.swing.text.TabExpander expander,
float x,
java.awt.font.FontRenderContext fontRenderContext,
int physicalLineOffset)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||