com.jrefinery.report.ext.barcode.filter.templates
Class BarcodeFieldTemplate

java.lang.Object
  |
  +--com.jrefinery.report.filter.templates.AbstractTemplate
        |
        +--com.jrefinery.report.ext.barcode.filter.templates.BarcodeFieldTemplate
All Implemented Interfaces:
java.lang.Cloneable, com.jrefinery.report.filter.DataRowConnectable, com.jrefinery.report.filter.DataSource, java.io.Serializable, com.jrefinery.report.filter.templates.Template
Direct Known Subclasses:
Barcode128FieldTemplate, Barcode39FieldTemplate, BarcodeEANFieldTemplate, BarcodeInter25FieldTemplate, BarcodePostnetFieldTemplate

public abstract class BarcodeFieldTemplate
extends com.jrefinery.report.filter.templates.AbstractTemplate
implements com.jrefinery.report.filter.DataRowConnectable

See Also:
Serialized Form

Constructor Summary
BarcodeFieldTemplate()
           
 
Method Summary
 java.lang.Object clone()
          Clones this DataSource.
 void connectDataRow(com.jrefinery.report.DataRow row)
          Connects the DataRow to the data source.
protected abstract  Barcode createBarcode()
           
 void disconnectDataRow(com.jrefinery.report.DataRow row)
          Releases the connection to the data row.
protected  BarcodeFilter getBarcodeFilter()
           
 java.awt.Color getBarColor()
           
 float getBarHeight()
           
 float getBaseline()
           
 java.lang.String getField()
           
 com.jrefinery.report.targets.FontDefinition getFont()
           
 float getMinWidth()
           
 com.jrefinery.report.ElementAlignment getTextAlignment()
           
 java.awt.Color getTextColor()
           
 java.lang.Object getValue()
          Returns the current value for the data source.
 boolean isDisplayChecksumInText()
           
 boolean isGenerateChecksum()
           
 void setBarColor(java.awt.Color barColor)
           
 void setBarHeight(float barHeight)
           
 void setBaseline(float baseline)
           
 void setDisplayChecksumInText(boolean displayChecksumInText)
           
 void setField(java.lang.String field)
           
 void setFont(com.jrefinery.report.targets.FontDefinition font)
           
 void setGenerateChecksum(boolean generateChecksum)
           
 void setMinWidth(float minWidth)
           
 void setTextAlignment(com.jrefinery.report.ElementAlignment textAlignment)
           
 void setTextColor(java.awt.Color textColor)
           
 
Methods inherited from class com.jrefinery.report.filter.templates.AbstractTemplate
getInstance, getName, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BarcodeFieldTemplate

public BarcodeFieldTemplate()
Method Detail

createBarcode

protected abstract Barcode createBarcode()

getBarcodeFilter

protected BarcodeFilter getBarcodeFilter()

getTextColor

public java.awt.Color getTextColor()

setTextColor

public void setTextColor(java.awt.Color textColor)

getBarColor

public java.awt.Color getBarColor()

setBarColor

public void setBarColor(java.awt.Color barColor)

getField

public java.lang.String getField()

setField

public void setField(java.lang.String field)

getMinWidth

public float getMinWidth()

setMinWidth

public void setMinWidth(float minWidth)

getFont

public com.jrefinery.report.targets.FontDefinition getFont()

setFont

public void setFont(com.jrefinery.report.targets.FontDefinition font)

getBaseline

public float getBaseline()

setBaseline

public void setBaseline(float baseline)

getBarHeight

public float getBarHeight()

setBarHeight

public void setBarHeight(float barHeight)

getTextAlignment

public com.jrefinery.report.ElementAlignment getTextAlignment()

setTextAlignment

public void setTextAlignment(com.jrefinery.report.ElementAlignment textAlignment)

isGenerateChecksum

public boolean isGenerateChecksum()

setGenerateChecksum

public void setGenerateChecksum(boolean generateChecksum)

isDisplayChecksumInText

public boolean isDisplayChecksumInText()

setDisplayChecksumInText

public void setDisplayChecksumInText(boolean displayChecksumInText)

getValue

public java.lang.Object getValue()
Returns the current value for the data source.

Specified by:
getValue in interface com.jrefinery.report.filter.DataSource
Returns:
the value.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones this DataSource.

Specified by:
clone in interface com.jrefinery.report.filter.DataSource
Overrides:
clone in class com.jrefinery.report.filter.templates.AbstractTemplate
Returns:
the clone.
Throws:
java.lang.CloneNotSupportedException - this should never happen.

connectDataRow

public void connectDataRow(com.jrefinery.report.DataRow row)
                    throws java.lang.IllegalStateException
Connects the DataRow to the data source.

Specified by:
connectDataRow in interface com.jrefinery.report.filter.DataRowConnectable
Parameters:
row - the data row.
Throws:
java.lang.IllegalStateException - if there is already a data row connected.

disconnectDataRow

public void disconnectDataRow(com.jrefinery.report.DataRow row)
                       throws java.lang.IllegalStateException
Releases the connection to the data row.

If no data row is connected, an IllegalStateException is thrown to indicate the programming error.

Specified by:
disconnectDataRow in interface com.jrefinery.report.filter.DataRowConnectable
Parameters:
row - the data row.
Throws:
java.lang.IllegalStateException - if there is already a data row connected.