当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
DrawLayerFactory.CaretLayer (Editor Library) - NetBeans API Javadoc (Current Development Version)
org.netbeans.editor
Class DrawLayerFactory.CaretLayer
java.lang.Object
org.netbeans.editor.DrawLayer.AbstractLayer
org.netbeans.editor.DrawLayerFactory.CaretLayer
- All Implemented Interfaces:
- DrawLayer
- Enclosing class:
- DrawLayerFactory
Deprecated. Please use Highlighting SPI instead, for details see
Editor Library 2.
public static class DrawLayerFactory.CaretLayer
- extends DrawLayer.AbstractLayer
Layer that covers selection services provided by caret.
This layer assumes that both caretMark and selectionMark in
BaseCaret are properly served so that their active flags
are properly set.
Method Summary |
boolean |
extendsEmptyLine()
Deprecated. Whether the layer marks the empty line with the background by half
of the character. |
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. |
DrawLayerFactory.CaretLayer
public DrawLayerFactory.CaretLayer()
- Deprecated.
extendsEmptyLine
public boolean extendsEmptyLine()
- Deprecated.
- Description copied from interface:
DrawLayer
- Whether the layer marks the empty line with the background by half
of the character.
- Specified by:
extendsEmptyLine
in interface DrawLayer
- Overrides:
extendsEmptyLine
in class DrawLayer.AbstractLayer
init
public void init(DrawContext ctx)
- Deprecated.
- Description copied from interface:
DrawLayer
- Called each time the paint begins for all layers
in the layer chain regardless whether they are currently active
or not. It is intended to prepare the layer. It doesn't need
to set the next-activity-change-offset because isActive()
will be called at the begining of the drawing when this method
finishes.
- Specified by:
init
in interface DrawLayer
- Overrides:
init
in class DrawLayer.AbstractLayer
isActive
public boolean isActive(DrawContext ctx,
MarkFactory.DrawMark mark)
- Deprecated.
- Description copied from interface:
DrawLayer
- Return whether the layer is active or not. This method
is called at the begining of the drawing,
then each time when the draw-mark is found at the current
fragment offset or when drawing reaches the next-activity-change-offset
of this layer (mark parameter is null in this case).
The layer must return whether it wants to be active for the next drawing
or not.
The layer should also consider
changing the next-activity-change-offset because the draw-engine
will ask for it after this method finishes.
If the mark is found at the same position like next-activity-change-offset
is, then this method is called only once with the valid mark parameter.
- Parameters:
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.
updateContext
public void updateContext(DrawContext ctx)
- Deprecated.
- Description copied from interface:
DrawLayer
- Update draw context by setting colors, fonts and possibly other draw
properties.
The method can use information from the context to find where the painting
process is currently located. It is called only if the layer is active.