borland Packages Class Hierarchy jbcl.view Package Index
java.lang.Object +----borland.jbcl.view.CustomItemPainter
Variables Constructors Properties Methods
Implements CustomPaintSite, ItemPainter, ItemPaintSite, Serializable
CustomItemPainter is an item painter you can subclass to create your own specialized item painter. The painter property allows you to specify an item painter to use to do the painting.
CustomItemPainter implements CustomPaintSite so you can customize the paint site with the background and foreground colors, font, alignment, and margin settings of your choosing. Custom item painters are especially useful for painting items in the cells of a grid. For example, you might want negative numbers in grid cells to be painted red while the others are painted black.
See also: CustomItemListener, CustomItemEditor
protected int alignment
protected Color background
protected Font font
protected Color foreground
protected Insets margins
protected transient ItemPainter painter
protected transient ItemPaintSite paintSite
public CustomItemPainter()Creates a CustomItemPainter class.
public CustomItemPainter(borland.jbcl.model.ItemPainter painter)Creates a CustomItemPainter class using the specified ItemPainter.
Parameters:
public int getAlignment() public void setAlignment(int alignment)Determines the alignment of the item being painted. Use one or some combination of the Alignment variables.
public Color getBackground() public void setBackground(java.awt.Color color)Determines the background color of the item being painted.
public Font getFont() public void setFont(java.awt.Font font)Determines the font of the item being painted.
public Color getForeground() public void setForeground(java.awt.Color color)Determines the foreground color of the item being painted.
public Insets getItemMargins() public void setItemMargins(java.awt.Insets margins)Determines the margins that surround the item being painted.
public ItemPainter getPainter() public void setPainter(borland.jbcl.model.ItemPainter painter)Determines the item painter used to do the painting.
public Component getSiteComponent()Returns the component used as the item paint site.
public boolean isTransparent()Determines whether the background of the item being painted is transparent so objects behind it show through. If it returns true, the item is painted with a transparent background.