public class TemplateElement extends Object implements PrintingElement
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
CENTER, LEFT, RIGHT| Constructor and Description |
|---|
TemplateElement(Hashtable parameters) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPrintingElement(PrintingElement e) |
int |
getHeight() |
String |
getId() |
PrintingElement |
getPrintingElement(String id) |
int |
getWidth() |
int |
getX() |
int |
getY() |
protected JPanel |
initComponent() |
void |
paint(Graphics g,
double scale) |
void |
paintInPage(Graphics g,
PageFormat f) |
void |
paintStretch(Graphics g,
PageFormat pf) |
void |
preview() |
void |
preview(Dialog f) |
void |
preview(Dialog f,
int width,
int height) |
void |
preview(Frame f) |
void |
preview(Frame f,
int width,
int height) |
void |
print() |
void |
print(PrinterJob pjExt,
PageFormat pfExt) |
void |
print(String name) |
static void |
printGroup(TemplateElement[] templates) |
void |
setContent(Object c)
If the parameter is a Hashtable object then set the values for all the
template elements.
|
void |
setFitToPage(boolean fit) |
void |
setHeight(int h) |
void |
setupPage() |
void |
setWidth(int w) |
void |
setX(int x) |
void |
setY(int y) |
public TemplateElement(Hashtable parameters)
protected JPanel initComponent()
public void addPrintingElement(PrintingElement e)
public void preview()
public void preview(Frame f)
public void preview(Frame f, int width, int height)
public void preview(Dialog f)
public void preview(Dialog f, int width, int height)
public void print()
public void print(String name)
public void print(PrinterJob pjExt, PageFormat pfExt)
public void setupPage()
public PrintingElement getPrintingElement(String id)
public void setContent(Object c)
setContent in interface PrintingElementpublic String getId()
getId in interface PrintingElementpublic void paint(Graphics g, double scale)
paint in interface PrintingElementpublic void paintStretch(Graphics g, PageFormat pf)
public void paintInPage(Graphics g, PageFormat f)
paintInPage in interface PrintingElementpublic void setFitToPage(boolean fit)
public int getX()
getX in interface PrintingElementpublic int getY()
getY in interface PrintingElementpublic int getWidth()
getWidth in interface PrintingElementpublic int getHeight()
getHeight in interface PrintingElementpublic void setX(int x)
setX in interface PrintingElementpublic void setY(int y)
setY in interface PrintingElementpublic void setWidth(int w)
setWidth in interface PrintingElementpublic void setHeight(int h)
setHeight in interface PrintingElementpublic static void printGroup(TemplateElement[] templates) throws PrinterException
PrinterExceptionCopyright © 2016 Imatia Innovation S.L.. All rights reserved.