Ontimize 5.2072EN

com.ontimize.printing
Class Paragraph

java.lang.Object
  extended bycom.ontimize.printing.Paragraph
All Implemented Interfaces:
ReportElement

public class Paragraph
extends java.lang.Object
implements ReportElement

This class implements a text paragraph with configurable parameters (font,...).

Author:
Imatia Innovation

Field Summary
protected  java.lang.String identifier
           
protected  Layer layer
           
protected  javax.swing.text.Element paragraphElement
           
protected  java.util.Vector sentences
           
protected  java.lang.String textContain
           
 
Fields inherited from interface com.ontimize.printing.ReportElement
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, DEBUG, HEADERID, PIEID, SUMMARYID, TITLEID
 
Constructor Summary
Paragraph(java.lang.String id, int leftMargin)
           
Paragraph(java.lang.String id, int leftMargin, int width)
           
 
Method Summary
 void add(java.lang.String text)
          Adds a text to the paragraph with the default attributes (font, etc)
 void add(java.lang.String text, TextAttributes attributes)
          Adds a text to the paragraph with the specified attributes
 void insert(ReportFrame reportFrame, boolean multipage)
          Method that inserts the correct HTML code in report.
protected  void insert(ReportFrame reportFrame, boolean multipage, com.ontimize.printing.Paragraph.Sentence sentence, javax.swing.text.Element paragraphElement)
          Insert page by page
 void insert(ReportFrame reportFrame, java.lang.String identifier, boolean multipage)
          Insert in the template, in the element with the specified identifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textContain

protected java.lang.String textContain

sentences

protected java.util.Vector sentences

identifier

protected java.lang.String identifier

layer

protected Layer layer

paragraphElement

protected javax.swing.text.Element paragraphElement
Constructor Detail

Paragraph

public Paragraph(java.lang.String id,
                 int leftMargin)

Paragraph

public Paragraph(java.lang.String id,
                 int leftMargin,
                 int width)
Method Detail

add

public void add(java.lang.String text)
Adds a text to the paragraph with the default attributes (font, etc)

Parameters:
text -

add

public void add(java.lang.String text,
                TextAttributes attributes)
Adds a text to the paragraph with the specified attributes

Parameters:
text -
attributes -

insert

public void insert(ReportFrame reportFrame,
                   boolean multipage)
            throws java.lang.Exception
Description copied from interface: ReportElement
Method that inserts the correct HTML code in report.

Specified by:
insert in interface ReportElement
Parameters:
reportFrame - The report frame
multipage - condition to know when report is multipage or not
Throws:
java.lang.Exception - When an Exception occurs

insert

protected void insert(ReportFrame reportFrame,
                      boolean multipage,
                      com.ontimize.printing.Paragraph.Sentence sentence,
                      javax.swing.text.Element paragraphElement)
Insert page by page

Parameters:
reportFrame -
multipage -
sentence -
paragraphElement -

insert

public void insert(ReportFrame reportFrame,
                   java.lang.String identifier,
                   boolean multipage)
            throws java.lang.Exception
Insert in the template, in the element with the specified identifier

Specified by:
insert in interface ReportElement
Parameters:
reportFrame - The report frame
identifier - Position in template where element must be inserted
multipage - Condition to know when report is multipage or not
Throws:
java.lang.Exception - When an Exception occurs

Ontimize