jbcl.view Package
java.lang.Object +----com.borland.jbcl.view.TextItemPainter +----com.borland.jbcl.view.EllipsisTextItemPainter
Variables Constructors Properties Methods
Implements ItemPainter, Serializable
Like TextItemPainter
, which it extends, the paint()
method of EllipsisTextItemPainter
extracts text from the passed data object and paints it in the given rectangle. If the entire text string cannot fit within the rectangle, however the paint()
method of EllipsisTextItemPainter
truncates the text and appends an ellipsis (...) to it, indicating that more text exists than is visible.
For example, suppose the text string is this:
Hello, all Java programmersIf an increasingly smaller rectangle is passed to the
EllipsisTextItemPainter
, the resulting text strings might look like this:
Hello, all Java pro... Hello, all J... Hello, ... He... ...
The column headings of GridControl
use an EllipsisTextItemPainter
.
public EllipsisTextItemPainter()Creates an
EllipsisTextItemPainter
.
public EllipsisTextItemPainter(int alignment)Constructs an
EllipsisTextItemPainter
that aligns the text as specified with the alignment
parameter.
Parameters:
alignment
com.borland.dx.text.Alignment
variables.
public EllipsisTextItemPainter(int alignment, Insets margins)Constructs an
EllipsisTextItemPainter
with the specified alignment and margins.
Parameters:
alignment
com.borland.dx.text.Alignment
variables.
margins
Insets
object that defines the margins around the text.
public EllipsisTextItemPainter(int alignment, Insets margins, ItemFormatter formatter)Constructs an
EllipsisTextItemPainter
with the specified alignment and margins. The painter uses the specified ItemFormatter
to format the text.
Parameters:
alignment
com.borland.dx.text.Alignment
variables.
margins
Insets
object that defines the margins around the text.
formatter
ItemFormatter
that determines how the text is formatted.