org.jcon.text
Class TruncateAndCat

java.lang.Object
  extended by org.jcon.text.TruncateAndCat
All Implemented Interfaces:
ObjectTransform

public class TruncateAndCat
extends java.lang.Object
implements ObjectTransform

This is a weird transform; essentially it stuffs two Strings into a fixed-width field by truncating the first so they fit (truncating the last is already handled by FixedWidthFieldPicture). It fetches the two Strings from the input object using property paths.

Author:
Paul Reavis

Constructor Summary
TruncateAndCat()
           
 
Method Summary
 java.lang.String getCatProperty()
           
 java.lang.String getTruncateProperty()
           
 int getWidth()
           
 void setCatProperty(java.lang.String newCatProperty)
           
 void setTruncateProperty(java.lang.String newTruncateProperty)
           
 void setWidth(int newWidth)
           
 java.lang.Object transform(java.lang.Object victim)
          Our one method; this transforms one object into another.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TruncateAndCat

public TruncateAndCat()
Method Detail

transform

public java.lang.Object transform(java.lang.Object victim)
Description copied from interface: ObjectTransform
Our one method; this transforms one object into another. Transformation must be nondestructive, but may produce a derived product that is still affected by changes to the original, so beware.

Specified by:
transform in interface ObjectTransform

getTruncateProperty

public java.lang.String getTruncateProperty()

setTruncateProperty

public void setTruncateProperty(java.lang.String newTruncateProperty)

getCatProperty

public java.lang.String getCatProperty()

setCatProperty

public void setCatProperty(java.lang.String newCatProperty)

getWidth

public int getWidth()

setWidth

public void setWidth(int newWidth)