Skip navigation links


com.essbase.eas.utils.print
Class WrappedTextPainter

java.lang.Object
  extended by com.essbase.eas.utils.print.WrappedTextPainter

All Implemented Interfaces:
PrintableObject, javax.swing.text.TabExpander

public class WrappedTextPainter
extends java.lang.Object
implements PrintableObject, javax.swing.text.TabExpander

A Table painter object

Since:
6.5.1
Version:
7.1.0
Author:
Sree Menon

Field Summary
protected  int height
           
protected  long[] offsets
           
protected  java.lang.Object wrappedText
           

 

Constructor Summary
WrappedTextPainter(java.lang.Object text, CRandomAccessFile raf)
           

 

Method Summary
 void calculateHeight(java.awt.print.PageFormat pageFormat, java.awt.Font font)
           
 void dispose()
           
 int drawObject(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int posX, int posY, int height)
          Draws the object at the x and y.
 int getHeight(java.awt.print.PageFormat pageFormat, java.awt.Font font)
          Returns the height of the object with the font
protected  java.lang.String getText()
           
static WrappedTextPainter getTextPainter(CRandomAccessFile raf, java.awt.print.PageFormat pageFormat, java.awt.Font font, java.lang.String text)
           
 int getWidth(java.awt.print.PageFormat pageFormat, java.awt.Font font)
          Returns the width of the object using the font
 float nextTabStop(float x, int tabOffset)
           
protected  java.lang.String readString(long offset)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

wrappedText

protected java.lang.Object wrappedText

height

protected int height

offsets

protected long[] offsets

Constructor Detail

WrappedTextPainter

public WrappedTextPainter(java.lang.Object text,
                          CRandomAccessFile raf)

Method Detail

getHeight

public int getHeight(java.awt.print.PageFormat pageFormat,
                     java.awt.Font font)
Description copied from interface: PrintableObject
Returns the height of the object with the font
Specified by:
getHeight in interface PrintableObject
font - font
Returns:
the height

calculateHeight

public void calculateHeight(java.awt.print.PageFormat pageFormat,
                            java.awt.Font font)
                     throws java.io.IOException
Throws:
java.io.IOException

readString

protected java.lang.String readString(long offset)

getWidth

public int getWidth(java.awt.print.PageFormat pageFormat,
                    java.awt.Font font)
Description copied from interface: PrintableObject
Returns the width of the object using the font
Specified by:
getWidth in interface PrintableObject
font - font
Returns:
the width

drawObject

public int drawObject(java.awt.Graphics graphics,
                      java.awt.print.PageFormat pageFormat,
                      int posX,
                      int posY,
                      int height)
Description copied from interface: PrintableObject
Draws the object at the x and y.
Specified by:
drawObject in interface PrintableObject
Parameters:
graphics - graphics to draw
pageFormat - the current page format
posX - the x position
posY - the Y position
height - the height
Returns:
the width of the object

nextTabStop

public float nextTabStop(float x,
                         int tabOffset)
Specified by:
nextTabStop in interface javax.swing.text.TabExpander

getText

protected java.lang.String getText()

dispose

public void dispose()

getTextPainter

public static WrappedTextPainter getTextPainter(CRandomAccessFile raf,
                                                java.awt.print.PageFormat pageFormat,
                                                java.awt.Font font,
                                                java.lang.String text)

Skip navigation links


Copyright © 2001, 2012, Oracle. All rights reserved.