borland Packages Class Hierarchy jbcl.util Package Index
java.lang.Object +----borland.jbcl.util.DottedLine
Variables Properties Methods
Implements Serializable
The DottedLine class draws dotted vertical and horizontal lines in several styles.
To draw horizontal lines, use one of the drawHLine() methods. To draw vertical lines, call a drawVLine() method. To draw a rectangle, use one of the drawRect() methods.
The styles are defined as DottedLine static constants that are used by the drawing methods. A defaultStyle static property defines the default drawing style that is used if a specific style isn't specified in the drawing methods.
The lines are drawn by blitting sections of the vlines.gif and hlines.gif images found in the borland.jbcl.util.image.* package. Don't modify these images as the DottedLine logic is based on the specific pixel layout of these images.
public static final int STYLE_1DOT2DOT_1SPACE = 9
public static final int STYLE_1DOT2DOT_2SPACE = 10
public static final int STYLE_1DOT3DOT_1SPACE = 11
public static final int STYLE_1DOT3DOT_2SPACE = 12
public static final int STYLE_1DOT_1SPACE = 0
public static final int STYLE_1DOT_2SPACE = 1
public static final int STYLE_1DOT_3SPACE = 2
public static final int STYLE_2DOT3DOT_1SPACE = 13
public static final int STYLE_2DOT3DOT_2SPACE = 14
public static final int STYLE_2DOT_1SPACE = 3
public static final int STYLE_2DOT_2SPACE = 4
public static final int STYLE_2DOT_3SPACE = 5
public static final int STYLE_3DOT_1SPACE = 6
public static final int STYLE_3DOT_2SPACE = 7
public static final int STYLE_3DOT_3SPACE = 8
public static final int STYLE_FIRST = STYLE_1DOT_1SPACE
public static final int STYLE_LAST = STYLE_2DOT3DOT_2SPACE
public static void drawHLine(java.awt.Graphics g, int x1, int x2, int y)Draws a horizontal line.
Parameters:
public static void drawHLine(java.awt.Graphics g, int x1, int x2, int y, int style)Draws a horizontal line using a specified style.
Parameters:
public static void drawRect(java.awt.Graphics g, int x, int y, int width, int height)Draws a rectangle.
Parameters:
public static void drawRect(java.awt.Graphics g, int x, int y, int width, int height, int style)Draws a rectangle using a specified style.
Parameters:
public static void drawVLine(java.awt.Graphics g, int x, int y1, int y2)Draws a vertical line.
Parameters:
public static void drawVLine(java.awt.Graphics g, int x, int y1, int y2, int style)Draws a vertical line.
Parameters:
public static int getDefaultStyle()Returns the default drawing style, which is one of the DottedLine style constants.
public static void setDefaultStyle(int style)Sets the default drawing style that is used if a specific style is specified by a drawing method.
Parameters: