Ontimize 5.2072EN

com.ontimize.printing
Class TemplateElement

java.lang.Object
  extended bycom.ontimize.printing.TemplateElement
All Implemented Interfaces:
PrintingElement

public class TemplateElement
extends java.lang.Object
implements PrintingElement


Field Summary
static boolean DEBUG
           
 
Fields inherited from interface com.ontimize.printing.PrintingElement
CENTER, LEFT, RIGHT
 
Constructor Summary
TemplateElement(java.util.Hashtable parameters)
           
 
Method Summary
 void addPrintingElement(PrintingElement e)
           
 int getHeight()
           
 java.lang.String getId()
           
 PrintingElement getPrintingElement(java.lang.String id)
           
 int getWidth()
           
 int getX()
           
 int getY()
           
protected  javax.swing.JPanel initComponent()
           
 void paint(java.awt.Graphics g, double scale)
           
 void paintInPage(java.awt.Graphics g, java.awt.print.PageFormat f)
           
 void paintStretch(java.awt.Graphics g, java.awt.print.PageFormat pf)
           
 void preview()
           
 void preview(java.awt.Dialog f)
           
 void preview(java.awt.Dialog f, int width, int height)
           
 void preview(java.awt.Frame f)
           
 void preview(java.awt.Frame f, int width, int height)
           
 void print()
           
 void print(java.awt.print.PrinterJob pjExt, java.awt.print.PageFormat pfExt)
           
 void print(java.lang.String name)
           
static void printGroup(TemplateElement[] templates)
           
 void setContent(java.lang.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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG
Constructor Detail

TemplateElement

public TemplateElement(java.util.Hashtable parameters)
Method Detail

initComponent

protected javax.swing.JPanel initComponent()

addPrintingElement

public void addPrintingElement(PrintingElement e)

preview

public void preview()

preview

public void preview(java.awt.Frame f)

preview

public void preview(java.awt.Frame f,
                    int width,
                    int height)

preview

public void preview(java.awt.Dialog f)

preview

public void preview(java.awt.Dialog f,
                    int width,
                    int height)

print

public void print()

print

public void print(java.lang.String name)

print

public void print(java.awt.print.PrinterJob pjExt,
                  java.awt.print.PageFormat pfExt)

setupPage

public void setupPage()

getPrintingElement

public PrintingElement getPrintingElement(java.lang.String id)

setContent

public void setContent(java.lang.Object c)
If the parameter is a Hashtable object then set the values for all the template elements.
If the parameter is a vector with hashtables then each hashtable will be a new page

Specified by:
setContent in interface PrintingElement

getId

public java.lang.String getId()
Specified by:
getId in interface PrintingElement

paint

public void paint(java.awt.Graphics g,
                  double scale)
Specified by:
paint in interface PrintingElement

paintStretch

public void paintStretch(java.awt.Graphics g,
                         java.awt.print.PageFormat pf)

paintInPage

public void paintInPage(java.awt.Graphics g,
                        java.awt.print.PageFormat f)
Specified by:
paintInPage in interface PrintingElement

setFitToPage

public void setFitToPage(boolean fit)

getX

public int getX()
Specified by:
getX in interface PrintingElement

getY

public int getY()
Specified by:
getY in interface PrintingElement

getWidth

public int getWidth()
Specified by:
getWidth in interface PrintingElement

getHeight

public int getHeight()
Specified by:
getHeight in interface PrintingElement

setX

public void setX(int x)
Specified by:
setX in interface PrintingElement

setY

public void setY(int y)
Specified by:
setY in interface PrintingElement

setWidth

public void setWidth(int w)
Specified by:
setWidth in interface PrintingElement

setHeight

public void setHeight(int h)
Specified by:
setHeight in interface PrintingElement

printGroup

public static void printGroup(TemplateElement[] templates)
                       throws java.awt.print.PrinterException
Throws:
java.awt.print.PrinterException

Ontimize