JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table
Class JCCellBorder

java.lang.Object
  |
  +--com.klg.jclass.table.JCCellBorder
All Implemented Interfaces:
CellBorderModel, Serializable

public class JCCellBorder
extends Object
implements CellBorderModel, Serializable

The JCCellBorder class implements the CellBorderModel interface, and provides border drawing for the standard border types.

         BORDER_ETCHED_IN    double line; cell appears inset
         BORDER_ETCHED_OUT   double line; cell appears raised
         BORDER_FRAME_IN     1-pixel shadow-in at edge; cell appears framed
         BORDER_FRAME_OUT    1-pixel shadow-out at edge; cell appears framed
         BORDER_IN           cell appears inset
         BORDER_OUT          cell appears raised
         BORDER_PLAIN        shadow drawn in foreground color
         BORDER_THIN         thin border drawn in highlight color
         BORDER_NONE         no border
 

See Also:
Serialized Form

Field Summary
static int BORDERSIDE_THIN_BOTTOM
          A JCCellBorder BorderSide property constant indicating that a thin border should draw an explicit bottom hand side.
static int BORDERSIDE_THIN_RIGHT
          A JCCellBorder BorderSide property constant indicating that a thin border should draw an explicit right hand side.
protected  int borderType
           
 
Constructor Summary
JCCellBorder()
          Creates a new JCCellBorder object and initializes the type to JCTableEnum.BORDER_NONE
JCCellBorder(int borderType)
          Creates a new JCCellBorder object.
 
Method Summary
 void drawBackground(Graphics gc, int size, int sides, int x, int y, int width, int height, Color top_color, Color bottom_color, Color plain_color)
          Invokes the border drawing mechanism appropriate to the type of border.
 int getBorderType()
          Returns the border type.
 void setBorderType(int v)
          Sets the border type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BORDERSIDE_THIN_RIGHT

public static final int BORDERSIDE_THIN_RIGHT
A JCCellBorder BorderSide property constant indicating that a thin border should draw an explicit right hand side. Used internally.

See Also:
Constant Field Values

BORDERSIDE_THIN_BOTTOM

public static final int BORDERSIDE_THIN_BOTTOM
A JCCellBorder BorderSide property constant indicating that a thin border should draw an explicit bottom hand side. Used internally.

See Also:
Constant Field Values

borderType

protected int borderType
Constructor Detail

JCCellBorder

public JCCellBorder()
Creates a new JCCellBorder object and initializes the type to JCTableEnum.BORDER_NONE


JCCellBorder

public JCCellBorder(int borderType)
Creates a new JCCellBorder object.

Parameters:
borderType - one of the following JCTableEnum members:
  BORDER_ETCHED_IN    double line; cell appears inset
  BORDER_ETCHED_OUT   double line; cell appears raised
  BORDER_FRAME_IN     1-pixel shadow-in at edge; cell appears framed
  BORDER_FRAME_OUT    1-pixel shadow-out at edge; cell appears framed
  BORDER_IN           cell appears inset
  BORDER_OUT          cell appears raised
  BORDER_PLAIN        shadow drawn in foreground color
  BORDER_THIN         thin border drawn in highlight color
  BORDER_NONE         no border
  
Method Detail

setBorderType

public void setBorderType(int v)
Sets the border type.

Parameters:
v -

getBorderType

public int getBorderType()
Returns the border type.

Returns:
border type

drawBackground

public void drawBackground(Graphics gc,
                           int size,
                           int sides,
                           int x,
                           int y,
                           int width,
                           int height,
                           Color top_color,
                           Color bottom_color,
                           Color plain_color)
Invokes the border drawing mechanism appropriate to the type of border.

Specified by:
drawBackground in interface CellBorderModel
Parameters:
bottom_color -
gc -
height -
plain_color -
sides -
size -
top_color -
width -
x -
y -

Copyright © 2004 Quest Software Inc..
All rights reserved.