borland Packages  Class Hierarchy  dx.dataset Package 

CustomPaintSite interface

com.borland.dx.dataset.CustomPaintSite

About the CustomPaintSite interface

Properties  Methods  
The ItemPaintSite interface is the one that is passed to the Column.CustomPaint event handler. Classes that implement the ItemPaintSite and CustomPaintSite interfaces can provide item painters with information about the host container in which the painting occurs.

The CustomPaintSite interface has the methods for retrieving and setting display-related properties, such as the background color, the foreground color, the font, the alignment setting, the margins for the item being painted, and the item's transparent state.


CustomPaintSite properties

*Read-only properties **Write-only properties

Properties defined in this interface

CustomPaintSite methods

Methods defined in this interface


CustomPaintSite properties

alignment

 public int getAlignment()
 public void setAlignment(int alignment)
The alignment setting for the item being painted.

See also: com.borland.dx.text.Alignment for alignment settings.

Parameters:

alignment
An int representing the alignment bitmask.

background

 public Color getBackground()
 public void setBackground(Color color)
The background color for the item being painted.

Parameters:

color
A java.awt.Color object representing the background color.

font

 public Font getFont()
 public void setFont(Font font)
The font to use for the item being painted.

Parameters:

font
A java.awt.Font object representing the font to use.

foreground

 public Color getForeground()
 public void setForeground(Color color)
The foreground color for the item being painted.

Parameters:

color
A java.awt.Color object representing the foreground color.

itemMargins

 public Insets getItemMargins()
 public void setItemMargins(Insets margins)
The item margins for the item being painted.

Parameters:

margins
An Insets object representing the margins for this item.

siteComponent

 public Component getSiteComponent()
Returns the hosting-site component representing the ItemPaintSite. This is used for coordinate space calculations, as well as to provide a component for ItemPainter implementations that require one, like ImageItemPainter, which requires an ImageObserver object.

transparent

 public boolean isTransparent()
Whether or not the ItemPainter should erase its background. Returns true if transparent, false if not.

CustomPaintSite methods

reset()

  public void reset()
The reset method reassigns all set values back to the defaults provided by the original ItemPaintSite.