public class IlvPrintableLabel extends IlvPrintableObject
IlvPage
NO_SUCH_PAGE, PAGE_EXISTS
Constructor and Description |
---|
IlvPrintableLabel(String label,
Font font,
Color color,
IlvUnit.Rectangle area)
Creates a
IlvPrintableLabel with the specified label, font,
color, and position. |
IlvPrintableLabel(String label,
IlvUnit.Rectangle area)
Creates a
IlvPrintableLabel with the specified label and position. |
Modifier and Type | Method and Description |
---|---|
Color |
getColor()
Returns the color used to print the label.
|
Font |
getFont()
Returns the font used to print the label.
|
String |
getLabel()
Returns the label to be printed.
|
IlvUnit.Rectangle |
getPrintableArea()
Returns the area, in page coordinates, defining where the label
should be printed.
|
int |
print(Graphics dst,
PageFormat format,
int pageIndex)
Implements the
java.awt.print.Printable.print method. |
void |
setColor(Color color)
Sets the color used to print the label.
|
void |
setFont(Font font)
Sets the font used to print the label.
|
void |
setLabel(String label)
Sets the label to be printed.
|
void |
setPrintableArea(IlvUnit.Rectangle area)
Sets the area, in page coordinates, defining where the label
should be printed.
|
getPage
public IlvPrintableLabel(String label, Font font, Color color, IlvUnit.Rectangle area)
IlvPrintableLabel
with the specified label, font,
color, and position.label
- The label to be printed.font
- The font used to print the label.color
- The color used to print the label.area
- The position where the label is printed.public IlvPrintableLabel(String label, IlvUnit.Rectangle area)
IlvPrintableLabel
with the specified label and position.
The font is created by calling Font.decode(null)
and the
color is black.label
- The label to be printed.area
- The position where the label is printed.public String getLabel()
setLabel(java.lang.String)
public void setLabel(String label)
label
- The label to be printed.getLabel()
public Color getColor()
setColor(java.awt.Color)
public void setColor(Color color)
color
- The color used to print the label.getColor()
public Font getFont()
setFont(java.awt.Font)
public void setFont(Font font)
font
- The font used to print the label.getFont()
public IlvUnit.Rectangle getPrintableArea()
setPrintableArea(ilog.views.util.print.IlvUnit.Rectangle)
public void setPrintableArea(IlvUnit.Rectangle area)
area
- The print area, defined in page coordinates.getPrintableArea()
public int print(Graphics dst, PageFormat format, int pageIndex) throws PrinterException
java.awt.print.Printable.print
method.
This method is called to print the label.dst
- The output device, which must be a Graphics2D
object.format
- The format of the page.pageIndex
- The index of the page.PrinterException
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.