ilog.views.util.print
Class IlvFlow

java.lang.Object
  extended by ilog.views.util.print.IlvFlow

public class IlvFlow
extends Object

An IlvFlow objects allows to add styled text in a document. A document can be associated with only one flow object. To create a flow of text for a document use the method IlvPrintableDocument.getFlow() then use the methods of the IlvFlow class to populate the document. In case the content of the document is defined by a flow of text, the IlvFlow object is responsible for creating the pages of the document.

Since:
JViews 5.5
See Also:
IlvPrintableDocument.getFlow()

Nested Class Summary
static class IlvFlow.TextStyle
          Defines the style of text that is added to an IlvFlow.
 
Field Summary
static int BOTTOM_ALIGNMENT
          Aligns bottom of graphic to bottom of line.
static int CENTER_BASELINE
          Aligns origin of graphic to center baseline of line.
static int HANGING_BASELINE
          Aligns origin of graphic to hanging baseline of line.
static int ROMAN_BASELINE
          Aligns origin of graphic to roman baseline of line.
static int TOP_ALIGNMENT
          Aligns top of graphic to top of line.
 
Method Summary
 void add(IlvFlowObject object, int alignment)
          Adds the object in the current line of text using the specified alignment on the line.
 void add(Image image, int alignment)
          Add the image in the current line of text using the specified alignment on the line.
 void add(String text)
          Adds the specified text to the current paragraph.
 IlvPrintableDocument getDocument()
          Returns the document associated with this flow.
 void invalidate()
          Invalidates the flow.
 boolean isValid()
          Indicates if the flow is valid.
 void layout()
          Layouts the flow of text.
 void newLine()
          Starts a new paragraph in the flow of text.
 void newPage()
          Starts a new page in the flow of text.
 void setTextStyle(IlvFlow.TextStyle style)
          Changes the current text style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOTTOM_ALIGNMENT

public static final int BOTTOM_ALIGNMENT
Aligns bottom of graphic to bottom of line.

See Also:
Constant Field Values

CENTER_BASELINE

public static final int CENTER_BASELINE
Aligns origin of graphic to center baseline of line.

See Also:
Constant Field Values

HANGING_BASELINE

public static final int HANGING_BASELINE
Aligns origin of graphic to hanging baseline of line.

See Also:
Constant Field Values

ROMAN_BASELINE

public static final int ROMAN_BASELINE
Aligns origin of graphic to roman baseline of line.

See Also:
Constant Field Values

TOP_ALIGNMENT

public static final int TOP_ALIGNMENT
Aligns top of graphic to top of line.

See Also:
Constant Field Values
Method Detail

getDocument

public IlvPrintableDocument getDocument()
Returns the document associated with this flow.


invalidate

public void invalidate()
Invalidates the flow. The next call to layout will then recreate the pages of the document.


isValid

public boolean isValid()
Indicates if the flow is valid. This returns true is the pages of the document are reflecting the content of the flow.


layout

public void layout()
Layouts the flow of text. If the flow is not valid, this method removes all the pages of the document and recreate new pages according to the content of the flow. Then the flow is marked as valid.


setTextStyle

public void setTextStyle(IlvFlow.TextStyle style)
Changes the current text style.

Parameters:
style - The new style to apply, note that this object is cloned and thus you can continue to use this instance for further modifications of the style.

add

public void add(String text)
Adds the specified text to the current paragraph. The text will have the current text style.


add

public void add(Image image,
                int alignment)
Add the image in the current line of text using the specified alignment on the line.


add

public void add(IlvFlowObject object,
                int alignment)
Adds the object in the current line of text using the specified alignment on the line.


newLine

public void newLine()
Starts a new paragraph in the flow of text.


newPage

public void newPage()
Starts a new page in the flow of text.



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.