public interface UnderlinePainter
UnderlinePainter defines an interface for painting
an underline or separator. An underline is typically painted at the baseline of the font, while a separator is typically painted below the descent of a font to separate two lines of text.
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_SEPARATOR
Constant indicating separator type of underline.
|
static int |
TYPE_STRIKETHRU
Constant indicating strike-through type of underline.
|
static int |
TYPE_UNDERLINE
Constant indicating regular underline.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getUnderlineType()
Fetch the type of underline, such as TYPE_SEPARATOR.
|
void |
paintUnderline(java.awt.Graphics graphics,
java.awt.Color color,
int xPos,
int width,
int yTop,
int yBaseline,
int descent)
Paints the underline using this implementation of the
UnderlinePainter. |
static final int TYPE_STRIKETHRU
static final int TYPE_UNDERLINE
static final int TYPE_SEPARATOR
void paintUnderline(java.awt.Graphics graphics,
java.awt.Color color,
int xPos,
int width,
int yTop,
int yBaseline,
int descent)
UnderlinePainter.graphics - the graphics context to paint intocolor - the color to use for painting the underlinexPos - the x position to start painting fromwidth - the width of the underline to paintyTop - the y position of the top of the textyBaseline - the y position of the baseline of the text we are
drawing an underline fordescent - the descent of the font the text was drawn withint getUnderlineType()