|
Oxygen XML Editor 15.0 Author API | ||||||||
| 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 ColorHighlightPainterPainter 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(Color color,
int height,
int totalHeight)
Constructor. |
|
| Method Summary | |
|---|---|
Color |
getBgColor()
|
Color |
getColor()
|
Color |
getTextForegroundColor()
Get the text foreground color. |
void |
paint(HighlightPainterInfo pi)
Renders the highlight. |
void |
setBgColor(Color bgColor)
|
void |
setBgColor(Color bgColor,
boolean useLineBoxHeight)
|
void |
setColor(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(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(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 HighlightPainterpi - Information used by highlightHighlightPainter.paint(ro.sync.ecss.extensions.api.highlights.HighlightPainterInfo)public void setColor(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(Color bgColor)
bgColor - The background color to set.
public void setBgColor(Color bgColor,
boolean useLineBoxHeight)
bgColor - The background color to set.useLineBoxHeight - true to use the parent line height
for drawing the background color.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 Color getBgColor()
public Color getColor()
public void setTextForegroundColor(Color foregroundColor)
foregroundColor - The foreground color to set.public Color getTextForegroundColor()
getTextForegroundColor in interface TextForegroundHighlighterPainterTextForegroundHighlighterPainter.getTextForegroundColor()
|
Oxygen XML Editor 15.0 Author API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||