|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.0) E13403-08 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.editor.highlight.SimpleLinePainter
public class SimpleLinePainter
The SimpleLinePainter
is an implementation of the
which paints a straight
underline or separator of a given thickness. UnderlinePainter
Field Summary | |
---|---|
protected int |
_thickness
The thickness of the line to paint. |
protected int |
_underlineType
The type of underline, such as TYPE_UNDERLINE or TYPE_SEPARATOR. |
static int |
MAX_THICKNESS
The maximum thickness that can be specified to the line painter. |
Fields inherited from interface oracle.javatools.editor.highlight.UnderlinePainter |
---|
TYPE_SEPARATOR, TYPE_STRIKETHRU, TYPE_UNDERLINE |
Constructor Summary | |
---|---|
SimpleLinePainter(int thickness,
int underlineType)
Constructs a new SimpleLinePainter of the specified
thickness. |
Method Summary | |
---|---|
int |
getUnderlineType()
Fetch the type of underline, such as TYPE_SEPARATOR. |
protected int |
getYPos(int yTop,
int yBaseline,
int descent)
Utility routine to calculate the appropriate y position to start painting downwards from, based on the requested paint position (from baseline or from bottom), and the yBaseline coordinate and the descent.) |
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_THICKNESS
protected final int _thickness
protected final int _underlineType
Constructor Detail |
---|
public SimpleLinePainter(int thickness, int underlineType)
SimpleLinePainter
of the specified
thickness. Any thickness greater than MAX_THICKNESS will be
automatically reduced. The type of underline indicates where the
underline will be painted.
thickness
- the thickness of the line to paintunderlineType
- the type of underline, such as TYPE_SEPARATORMethod Detail |
---|
protected int getYPos(int yTop, int yBaseline, int descent)
yBaseline
- the y position of the baselinedescent
- the descent of the text below the baselinepublic void paintUnderline(java.awt.Graphics graphics, java.awt.Color color, int xPos, int width, int yTop, int yBaseline, int descent)
UnderlinePainter
.
paintUnderline
in interface 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 withpublic int getUnderlineType()
getUnderlineType
in interface UnderlinePainter
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.0) E13403-08 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |