Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.javatools.editor.highlight
Interface UnderlinePainter

All Known Implementing Classes:
DottedLinePainter, SimpleLinePainter, ZigZagLinePainter

public interface UnderlinePainter

The 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.


Field Summary
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.
 
Method Summary
 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.
 

Field Detail

TYPE_STRIKETHRU

static final int TYPE_STRIKETHRU
Constant indicating strike-through type of underline. This paints at the mid-level of text.

See Also:
Constant Field Values

TYPE_UNDERLINE

static final int TYPE_UNDERLINE
Constant indicating regular underline. This paints at the baseline of text.

See Also:
Constant Field Values

TYPE_SEPARATOR

static final int TYPE_SEPARATOR
Constant indicating separator type of underline. This paints below the descent of text to separate two lines.

See Also:
Constant Field Values
Method Detail

paintUnderline

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.

Parameters:
graphics - the graphics context to paint into
color - the color to use for painting the underline
xPos - the x position to start painting from
width - the width of the underline to paint
yTop - the y position of the top of the text
yBaseline - the y position of the baseline of the text we are drawing an underline for
descent - the descent of the font the text was drawn with

getUnderlineType

int getUnderlineType()
Fetch the type of underline, such as TYPE_SEPARATOR.

Returns:
the underline type

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.