borland Packages Class Hierarchy dx.dataset Package
com.borland.dx.dataset.CustomPaintSite
Properties Methods
Implemented by TableFastStringRenderer, TableMaskCellEditor
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.
public int getAlignment() public void setAlignment(int alignment)The
alignment
setting for the item being painted.
com.borland.dx.text.Alignment
for alignment settings.
alignment
public Color getBackground() public void setBackground(Color color)The background
color
for the item being painted.
color
java.awt.Color
object representing the background color.
public Font getFont() public void setFont(Font font)The
font
to use for the item being painted.
font
java.awt.Font
object representing the font to use.
public Color getForeground() public void setForeground(Color color)The foreground
color
for the item being painted.
color
java.awt.Color
object representing the foreground color.
public Insets getItemMargins() public void setItemMargins(Insets margins)The item
margins
for the item being painted.
margins
Insets
object representing the margins for this item.
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.
public boolean isTransparent()Whether or not the
ItemPainter
should erase its background. Returns true if transparent, false if not.
public void reset()The reset method reassigns all set values back to the defaults provided by the original
ItemPaintSite
.