net.sf.jasperreports.engine.fill
Class JRFillTextElement

java.lang.Object
  extended bynet.sf.jasperreports.engine.fill.JRFillElement
      extended bynet.sf.jasperreports.engine.fill.JRFillTextElement
All Implemented Interfaces:
JRAlignment, JRChild, JRElement, JRTextElement
Direct Known Subclasses:
JRFillStaticText, JRFillTextField

public abstract class JRFillTextElement
extends JRFillElement
implements JRTextElement

Version:
$Id: JRFillTextElement.java,v 1.28 2005/07/15 13:07:17 teodord Exp $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Nested Class Summary
protected static interface JRFillTextElement.TextChopper
           
 
Field Summary
protected  JRFillTextElement.TextChopper textChopper
           
 
Fields inherited from class net.sf.jasperreports.engine.fill.JRFillElement
band, elementGroup, filler, parent, printWhenGroupChanges, template
 
Fields inherited from interface net.sf.jasperreports.engine.JRTextElement
LINE_SPACING_1_1_2, LINE_SPACING_DOUBLE, LINE_SPACING_SINGLE, ROTATION_LEFT, ROTATION_NONE, ROTATION_RIGHT, TEXT_ALIGN_CENTER, TEXT_ALIGN_JUSTIFIED, TEXT_ALIGN_LEFT, TEXT_ALIGN_RIGHT
 
Fields inherited from interface net.sf.jasperreports.engine.JRElement
MODE_OPAQUE, MODE_TRANSPARENT, POSITION_TYPE_FIX_RELATIVE_TO_BOTTOM, POSITION_TYPE_FIX_RELATIVE_TO_TOP, POSITION_TYPE_FLOAT, STRETCH_TYPE_NO_STRETCH, STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT, STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT
 
Fields inherited from interface net.sf.jasperreports.engine.JRAlignment
HORIZONTAL_ALIGN_CENTER, HORIZONTAL_ALIGN_JUSTIFIED, HORIZONTAL_ALIGN_LEFT, HORIZONTAL_ALIGN_RIGHT, VERTICAL_ALIGN_BOTTOM, VERTICAL_ALIGN_JUSTIFIED, VERTICAL_ALIGN_MIDDLE, VERTICAL_ALIGN_TOP
 
Constructor Summary
protected JRFillTextElement(JRBaseFiller filler, JRTextElement textElement, JRFillObjectFactory factory)
           
 
Method Summary
protected  void chopTextElement(int availableStretchHeight)
           
 JRBox getBox()
          Returns an object containing all border and padding properties for this text element
 JRFont getFont()
          Returns an object containing all font properties for this text element
 byte getHorizontalAlignment()
          Gets the text horizontal alignment.
protected  float getLeadingOffset()
           
 byte getLineSpacing()
          Gets the line spacing.
protected  float getLineSpacingFactor()
           
protected  java.lang.String getRawText()
           
 byte getRotation()
          Gets the text rotation.
protected  byte getRunDirection()
           
protected  JRStyledText getStyledText()
           
protected  java.util.Map getStyledTextAttributes()
           
 java.lang.String getText()
           
 byte getTextAlignment()
          Gets the text horizontal alignment.
protected  int getTextEnd()
           
protected  float getTextHeight()
           
protected  int getTextStart()
           
 byte getVerticalAlignment()
          Gets the text vertical alignment.
 boolean isStyledText()
          Returns true if the text can contain style tags.
protected  void reset()
           
protected  void rewind()
           
 void setHorizontalAlignment(byte horizontalAlignment)
          Sets the text horizontal alignment.
protected  void setLeadingOffset(float leadingOffset)
           
 void setLineSpacing(byte lineSpacing)
          Sets the line spacing.
protected  void setLineSpacingFactor(float lineSpacingFactor)
           
protected  void setRawText(java.lang.String rawText)
           
 void setRotation(byte rotation)
          Sets the text rotation.
 void setStyledText(boolean isStyledText)
          Specifies whether the text can contain style tags.
 void setTextAlignment(byte horizontalAlignment)
          Sets the text horizontal alignment.
protected  void setTextEnd(int textEnd)
           
protected  void setTextHeight(float textHeight)
           
protected  void setTextStart(int textStart)
           
 void setVerticalAlignment(byte verticalAlignment)
          Gets the text vertical alignment.
 
Methods inherited from class net.sf.jasperreports.engine.fill.JRFillElement
addDependantElement, evaluate, evaluatePrintWhenExpression, fill, getBackcolor, getBand, getBandBottomY, getDependantElements, getElementGroup, getForecolor, getGroupElements, getHeight, getKey, getMode, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getRelativeY, getStretchHeight, getStretchType, getWidth, getX, getY, isAlreadyPrinted, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isPrintWhenExpressionNull, isPrintWhenTrue, isRemoveLineWhenBlank, isReprinted, isToPrint, moveDependantElements, prepare, resolveElement, setAlreadyPrinted, setBackcolor, setBand, setBandBottomY, setForecolor, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setPrintWhenExpressionNull, setPrintWhenTrue, setRelativeY, setRemoveLineWhenBlank, setReprinted, setStretchHeight, setStretchType, setToPrint, setWidth, setX, stretchElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jasperreports.engine.JRElement
collectExpressions, getBackcolor, getElementGroup, getForecolor, getHeight, getKey, getMode, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getStretchType, getWidth, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
 
Methods inherited from interface net.sf.jasperreports.engine.JRChild
getCopy, writeXml
 

Field Detail

textChopper

protected JRFillTextElement.TextChopper textChopper
Constructor Detail

JRFillTextElement

protected JRFillTextElement(JRBaseFiller filler,
                            JRTextElement textElement,
                            JRFillObjectFactory factory)
Method Detail

getTextAlignment

public byte getTextAlignment()
Deprecated. Replaced by getHorizontalAlignment().

Description copied from interface: JRTextElement
Gets the text horizontal alignment.

Specified by:
getTextAlignment in interface JRTextElement
Returns:
a value representing one of the horizontal alignment constants in JRAlignment

setTextAlignment

public void setTextAlignment(byte horizontalAlignment)
Deprecated. Replaced by setHorizontalAlignment(byte).

Description copied from interface: JRTextElement
Sets the text horizontal alignment.

Specified by:
setTextAlignment in interface JRTextElement
Parameters:
horizontalAlignment - a value representing one of the horizontal alignment constants in JRAlignment

getHorizontalAlignment

public byte getHorizontalAlignment()
Description copied from interface: JRAlignment
Gets the text horizontal alignment.

Specified by:
getHorizontalAlignment in interface JRAlignment
Returns:
a value representing one of the horizontal alignment constants in JRAlignment

setHorizontalAlignment

public void setHorizontalAlignment(byte horizontalAlignment)
Description copied from interface: JRAlignment
Sets the text horizontal alignment.

Specified by:
setHorizontalAlignment in interface JRAlignment
Parameters:
horizontalAlignment - a value representing one of the horizontal alignment constants in JRAlignment

getVerticalAlignment

public byte getVerticalAlignment()
Description copied from interface: JRAlignment
Gets the text vertical alignment.

Specified by:
getVerticalAlignment in interface JRAlignment
Returns:
a value representing one of the vertical alignment constants in JRAlignment

setVerticalAlignment

public void setVerticalAlignment(byte verticalAlignment)
Description copied from interface: JRAlignment
Gets the text vertical alignment.

Specified by:
setVerticalAlignment in interface JRAlignment
Parameters:
verticalAlignment - a value representing one of the vertical alignment constants in JRAlignment

getRotation

public byte getRotation()
Description copied from interface: JRTextElement
Gets the text rotation.

Specified by:
getRotation in interface JRTextElement
Returns:
a value representing one of the rotation constants in this class

setRotation

public void setRotation(byte rotation)
Description copied from interface: JRTextElement
Sets the text rotation.

Specified by:
setRotation in interface JRTextElement
Parameters:
rotation - a value representing one of the rotation constants in this class

getLineSpacing

public byte getLineSpacing()
Description copied from interface: JRTextElement
Gets the line spacing.

Specified by:
getLineSpacing in interface JRTextElement
Returns:
a value representing one of the line spacing constants in this class

setLineSpacing

public void setLineSpacing(byte lineSpacing)
Description copied from interface: JRTextElement
Sets the line spacing.

Specified by:
setLineSpacing in interface JRTextElement
Parameters:
lineSpacing - a value representing one of the line spacing constants in this class

isStyledText

public boolean isStyledText()
Description copied from interface: JRTextElement
Returns true if the text can contain style tags.

Specified by:
isStyledText in interface JRTextElement

setStyledText

public void setStyledText(boolean isStyledText)
Description copied from interface: JRTextElement
Specifies whether the text can contain style tags.

Specified by:
setStyledText in interface JRTextElement

getBox

public JRBox getBox()
Description copied from interface: JRTextElement
Returns an object containing all border and padding properties for this text element

Specified by:
getBox in interface JRTextElement

getFont

public JRFont getFont()
Description copied from interface: JRTextElement
Returns an object containing all font properties for this text element

Specified by:
getFont in interface JRTextElement

getStyledTextAttributes

protected java.util.Map getStyledTextAttributes()

getLineSpacingFactor

protected float getLineSpacingFactor()

setLineSpacingFactor

protected void setLineSpacingFactor(float lineSpacingFactor)

getLeadingOffset

protected float getLeadingOffset()

setLeadingOffset

protected void setLeadingOffset(float leadingOffset)

getRunDirection

protected byte getRunDirection()

getTextHeight

protected float getTextHeight()

setTextHeight

protected void setTextHeight(float textHeight)

getTextStart

protected int getTextStart()

setTextStart

protected void setTextStart(int textStart)

getTextEnd

protected int getTextEnd()

setTextEnd

protected void setTextEnd(int textEnd)

getRawText

protected java.lang.String getRawText()

setRawText

protected void setRawText(java.lang.String rawText)

reset

protected void reset()
Overrides:
reset in class JRFillElement

rewind

protected void rewind()
Specified by:
rewind in class JRFillElement

getStyledText

protected JRStyledText getStyledText()

getText

public java.lang.String getText()

chopTextElement

protected void chopTextElement(int availableStretchHeight)


© 2001-2005 JasperSoft Corporation www.jaspersoft.com