|
Oxygen XML Editor, Version 13.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectro.sync.ecss.extensions.api.highlights.ColorHighlightPainter
@API(type=EXTENDABLE, src=PUBLIC) public class ColorHighlightPainter
Painter that can be used to customize the way that a highlight is displayed by setting custom text decoration, text decoration stroke, background color or stroke color.
Nested Class Summary | |
---|---|
static class |
ColorHighlightPainter.TextDecoration
The decoration added to text. |
Constructor Summary | |
---|---|
ColorHighlightPainter()
Default constructor. |
|
ColorHighlightPainter(ro.sync.exml.view.graphics.Color color,
int height,
int totalHeight)
Constructor. |
Method Summary | |
---|---|
ro.sync.exml.view.graphics.Color |
getBgColor()
|
ro.sync.exml.view.graphics.Color |
getColor()
|
ro.sync.exml.view.graphics.Color |
getTextForegroundColor()
Get the text foreground color. |
void |
paint(HighlightPainterInfo pi)
Renders the highlight. |
void |
setBgColor(ro.sync.exml.view.graphics.Color bgColor)
|
void |
setColor(ro.sync.exml.view.graphics.Color c)
Set the color used for decoration (strike out or underline) |
void |
setStrikeOut(boolean strikeOut)
Deprecated. Use setTextDecoration(TextDecoration) instead. |
void |
setTextDecoration(ColorHighlightPainter.TextDecoration decoration)
Set the text decoration. |
void |
setTextDecorationStroke(int stroke)
Set the text decoration stroke. |
void |
setTextForegroundColor(ro.sync.exml.view.graphics.Color foregroundColor)
Set the text foreground color. |
boolean |
useBaseLineForUnderline()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorHighlightPainter()
public ColorHighlightPainter(ro.sync.exml.view.graphics.Color color, int height, int totalHeight)
color
- The color to use for highlight.height
- The height of the highlight line.
This may be smaller than the total height. If it is, the extra space will remain under the line.totalHeight
- The height of the highlight.Method Detail |
---|
public void paint(HighlightPainterInfo pi)
HighlightPainter
paint
in interface HighlightPainter
pi
- Information used by highlightHighlightPainter.paint(ro.sync.ecss.extensions.api.highlights.HighlightPainterInfo)
public void setColor(ro.sync.exml.view.graphics.Color c)
c
- The decoration color.public void setTextDecoration(ColorHighlightPainter.TextDecoration decoration)
ColorHighlightPainter.TextDecoration.NONE
no line will be drawn.
decoration
- The new text decoration.public void setBgColor(ro.sync.exml.view.graphics.Color bgColor)
bgColor
- The background color to set.public boolean useBaseLineForUnderline()
public void setTextDecorationStroke(int stroke)
stroke
- The new Stroke type. Constants are defined in Graphics
.@Deprecated public void setStrikeOut(boolean strikeOut)
setTextDecoration(TextDecoration)
instead.
strikeOut
- Set this highlight as strike out.public ro.sync.exml.view.graphics.Color getBgColor()
public ro.sync.exml.view.graphics.Color getColor()
public void setTextForegroundColor(ro.sync.exml.view.graphics.Color foregroundColor)
foregroundColor
- The foreground color to set.Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
public ro.sync.exml.view.graphics.Color getTextForegroundColor()
getTextForegroundColor
in interface TextForegroundHighlighterPainter
Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
TextForegroundHighlighterPainter.getTextForegroundColor()
|
Oxygen XML Editor, Version 13.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |