|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DrawLayer
Draw layer applies changes to draw context during painting process.
Each extended UI has its own set of layers.
It can currently include changes to font bold and italic attributes,
and foreground and background color (and probably more in future).
These changes are made by draw layer to draw context
in updateContext()
method.
Draw layers form double-linked lists. Renderer goes through
this list every time it draws the tokens of the text.
A layer can work either by returning the next-activity-change-offset
or by being activated through the draw-marks that it places
at the appropriate positions or it can mix these two approaches.
Nested Class Summary | |
---|---|
static class |
DrawLayer.AbstractLayer
Deprecated. Please use Highlighting SPI instead, for details see Editor Library 2. |
Field Summary | |
---|---|
static String |
TEXT_FRAME_END_POSITION_COMPONENT_PROPERTY
Deprecated. End of the next region with the frame. |
static String |
TEXT_FRAME_START_POSITION_COMPONENT_PROPERTY
Deprecated. Start of the next region with the frame. |
Method Summary | |
---|---|
boolean |
extendsEmptyLine()
Deprecated. Whether the layer marks the empty line with the background by half of the character. |
boolean |
extendsEOL()
Deprecated. Whether the layer wants to use the last context's background till the end of the window or not. |
String |
getName()
Deprecated. Get the name of the layer. |
int |
getNextActivityChangeOffset(DrawContext ctx)
Deprecated. Get the next position at which the activity of the layer will change. |
void |
init(DrawContext ctx)
Deprecated. Called each time the paint begins for all layers in the layer chain regardless whether they are currently active or not. |
boolean |
isActive(DrawContext ctx,
MarkFactory.DrawMark mark)
Deprecated. Return whether the layer is active or not. |
void |
updateContext(DrawContext ctx)
Deprecated. Update draw context by setting colors, fonts and possibly other draw properties. |
int |
updateLineNumberContext(int lineNumber,
DrawContext ctx)
Deprecated. Update draw context related to the drawing of line number for the given line by setting colors, fonts and possibly other draw properties. |
Field Detail |
---|
static final String TEXT_FRAME_START_POSITION_COMPONENT_PROPERTY
static final String TEXT_FRAME_END_POSITION_COMPONENT_PROPERTY
Method Detail |
---|
String getName()
boolean extendsEOL()
boolean extendsEmptyLine()
int getNextActivityChangeOffset(DrawContext ctx)
void init(DrawContext ctx)
boolean isActive(DrawContext ctx, MarkFactory.DrawMark mark)
ctx
- current context with the information about the drawingmark
- draw-mark at the fragment-offset or null if called
because of the next-activity-change-offset.void updateContext(DrawContext ctx)
int updateLineNumberContext(int lineNumber, DrawContext ctx)
lineNumber
- the number that will be drawn before the line's text.
The layer can change it by returning a different value.ctx
- the draw context
|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |