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

E13403-08

oracle.javatools.editor.highlight
Class DottedLinePainter

java.lang.Object
  extended by oracle.javatools.editor.highlight.SimpleLinePainter
      extended by oracle.javatools.editor.highlight.DottedLinePainter
All Implemented Interfaces:
UnderlinePainter

public class DottedLinePainter
extends SimpleLinePainter

The DottedLinePainter is an implementation of the UnderlinePainter which paints a straight, but dotted underline or separator of a given thickness.


Field Summary
protected  int _dottedWidth
          The width of the visible dotted line.
protected  int _gapWidth
          The width of the gap between the dotted lines.
static int MAX_WIDTH
          The maximum width of either the visible dotted line (dottedWidth) or the dotted gap.
static int MIN_WIDTH
          The minimum width of either the visible dotted line (dottedWidth) or the dotted gap.
 
Fields inherited from class oracle.javatools.editor.highlight.SimpleLinePainter
_thickness, _underlineType, MAX_THICKNESS
 
Fields inherited from interface oracle.javatools.editor.highlight.UnderlinePainter
TYPE_SEPARATOR, TYPE_STRIKETHRU, TYPE_UNDERLINE
 
Constructor Summary
DottedLinePainter(int thickness, int underlineType, int dottedWidth, int gapWidth)
          Constructs a new DottedLinePainter of the specified thickness.
 
Method Summary
 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 oracle.javatools.editor.highlight.SimpleLinePainter
getUnderlineType, getYPos
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_WIDTH

public static final int MAX_WIDTH
The maximum width of either the visible dotted line (dottedWidth) or the dotted gap.

See Also:
Constant Field Values

MIN_WIDTH

public static final int MIN_WIDTH
The minimum width of either the visible dotted line (dottedWidth) or the dotted gap.

See Also:
Constant Field Values

_dottedWidth

protected final int _dottedWidth
The width of the visible dotted line.


_gapWidth

protected final int _gapWidth
The width of the gap between the dotted lines.

Constructor Detail

DottedLinePainter

public DottedLinePainter(int thickness,
                         int underlineType,
                         int dottedWidth,
                         int gapWidth)
Constructs a new DottedLinePainter of the specified thickness. The dottedWidth is the width of the visible (dotted) lines, while the gapWidth is the width of the gaps between the dotted lines.

Parameters:
thickness - the thickness of the line to paint
underlineType - the type of underline, such as TYPE_SEPARATOR
dottedWidth - the width of the visible lines
gapWidth - the width of the gap between visible lines
Method Detail

paintUnderline

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

Specified by:
paintUnderline in interface UnderlinePainter
Overrides:
paintUnderline in class SimpleLinePainter
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

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

E13403-08

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