|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttecgraf.javautils.gui.print.PrintableText
public class PrintableText
Texto a ser impresso. O texto pode possuir um título que fica à esquerda. Se
houver um título, o texto fica alinhado depois do título.
Por exemplo:
título: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
| Field Summary | |
|---|---|
static String |
ALIGN_CENTER
Alinhamento central |
protected Point2D |
pt
Ponto para uso temporário |
protected Rectangle2D |
rect
Retângulo para uso temporário |
protected TextTool |
textTool
Ferramenta de impressão de texto |
| Fields inherited from interface tecgraf.javautils.gui.print.PrintableReportItem |
|---|
CM_TO_INCH |
| Constructor Summary | |
|---|---|
PrintableText(String text,
Font textFont)
Construtor de textos sem título. |
|
PrintableText(String text,
Font textFont,
boolean changeFont)
Construtor de textos sem título. |
|
PrintableText(String title,
Font titleFont,
String text,
Font textFont)
Construtor de textos com título. |
|
PrintableText(String title,
Font titleFont,
String text,
Font textFont,
boolean changeFont)
Construtor de textos com título. |
|
| Method Summary | |
|---|---|
float |
getHeight()
Obtém a altura do item impresso na página. |
String |
getText()
Obtém o texto da área. |
String |
getTitle()
Obtém o título do texto. |
float |
getWidth()
Obtém a largura do item impresso na página. |
void |
initPrinting(PrintConfiguration configuration)
Prepara a impressão com determinada configuração de impressão. |
boolean |
print(Graphics2D g2,
PageFormat format,
int pageIndex)
Imprime o item. |
void |
setAlignment(String alignment)
Indica o alinhamento do texto. |
void |
setLeftInset(float leftInset)
Indica o espaçamento do texto à esquerda em centímetros. |
boolean |
simulatePrint(Graphics2D g2,
PageFormat format,
int pageIndex)
Simula a impressão do item, isto é, gera a impressão no componente gráfico como se estivesse imprimindo, mas sem imprimir de fato. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ALIGN_CENTER
protected TextTool textTool
protected Rectangle2D rect
protected Point2D pt
| Constructor Detail |
|---|
public PrintableText(String text,
Font textFont)
text - texto da área.textFont - fonte do texto.
public PrintableText(String text,
Font textFont,
boolean changeFont)
text - texto da área.textFont - fonte do texto.changeFont - indica se a fonte pode ser alterada pela configuração.
public PrintableText(String title,
Font titleFont,
String text,
Font textFont)
title - título.titleFont - fonte do título.text - texto.textFont - fonte do texto.
public PrintableText(String title,
Font titleFont,
String text,
Font textFont,
boolean changeFont)
title - título.titleFont - fonte do título.text - texto.textFont - fonte do texto.changeFont - indica se a fonte pode ser alterada pela proporção.| Method Detail |
|---|
public boolean simulatePrint(Graphics2D g2,
PageFormat format,
int pageIndex)
simulatePrint in interface PrintableReportItemg2 - componente gráfico.format - formato da página a ser impressa.pageIndex - índice da página a ser impressa.
public boolean print(Graphics2D g2,
PageFormat format,
int pageIndex)
print in interface PrintableReportItemg2 - componente gráfico.format - formato da página a ser impressa.pageIndex - índice da página a ser impressa.
public float getHeight()
getHeight in interface PrintableReportItempublic String getText()
public String getTitle()
public void setAlignment(String alignment)
alignment - alinhamento do texto.public void setLeftInset(float leftInset)
leftInset - espaçamento à esquerda em centímetros.public void initPrinting(PrintConfiguration configuration)
initPrinting in interface PrintableReportItemconfiguration - configuração de impressão.public float getWidth()
getWidth in interface PrintableReportItem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||