barcode4j 2.1.0

org.krysalis.barcode4j.impl.fourstate
Class AbstractFourStateBean

java.lang.Object
  extended by org.krysalis.barcode4j.impl.AbstractBarcodeBean
      extended by org.krysalis.barcode4j.impl.HeightVariableBarcodeBean
          extended by org.krysalis.barcode4j.impl.fourstate.AbstractFourStateBean
All Implemented Interfaces:
BarcodeGenerator
Direct Known Subclasses:
RoyalMailCBCBean, USPSIntelligentMailBean

public abstract class AbstractFourStateBean
extends HeightVariableBarcodeBean

Abstract base class for four state barcode beans.

Version:
$Id: AbstractFourStateBean.java,v 1.1 2008/05/13 13:00:43 jmaerki Exp $
Author:
Jeremias Maerki

Field Summary
 
Fields inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical
 
Constructor Summary
AbstractFourStateBean()
          Create a new instance.
 
Method Summary
 double getAscenderHeight()
          Returns the height of the ascender/descender.
 double getBarHeight(int height)
          Returns the effective height of a bar with a given logical height.
 double getBarWidth(int width)
          Returns the effective width of a bar with a given logical width.
 ChecksumMode getChecksumMode()
          Returns the current checksum mode.
 double getIntercharGapWidth()
          Returns the width between encoded characters.
 double getTrackHeight()
          Returns the height of the track.
 double getVerticalQuietZone()
          Returns the vertical quiet zone.
 void setAscenderHeight(double height)
          Sets the height of the ascender/descender.
 void setChecksumMode(ChecksumMode mode)
          Sets the checksum mode
 void setIntercharGapWidth(double width)
          Sets the width between encoded characters.
 void setTrackHeight(double height)
          Sets the height of the track.
protected  void updateHeight()
          Updates the height variable of the barcode.
 
Methods inherited from class org.krysalis.barcode4j.impl.AbstractBarcodeBean
calcDimensions, doQuietZone, generateBarcode, getBarHeight, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, hasFontDescender, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setMsgPosition, setPattern, setQuietZone, setVerticalQuietZone
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFourStateBean

public AbstractFourStateBean()
Create a new instance.

Method Detail

setChecksumMode

public void setChecksumMode(ChecksumMode mode)
Sets the checksum mode

Parameters:
mode - the checksum mode

getChecksumMode

public ChecksumMode getChecksumMode()
Returns the current checksum mode.

Returns:
ChecksumMode the checksum mode

getVerticalQuietZone

public double getVerticalQuietZone()
Description copied from class: AbstractBarcodeBean
Returns the vertical quiet zone. If no vertical quiet zone is set explicitely, the value if AbstractBarcodeBean.getQuietZone() is returned.

Overrides:
getVerticalQuietZone in class AbstractBarcodeBean
Returns:
the height of the vertical quiet zone (in mm)

getIntercharGapWidth

public double getIntercharGapWidth()
Returns the width between encoded characters.

Returns:
the interchar gap width

setIntercharGapWidth

public void setIntercharGapWidth(double width)
Sets the width between encoded characters.

Parameters:
width - the interchar gap width

getTrackHeight

public double getTrackHeight()
Returns the height of the track.

Returns:
the height of the track

setTrackHeight

public void setTrackHeight(double height)
Sets the height of the track.

Parameters:
height - the height of the track

getAscenderHeight

public double getAscenderHeight()
Returns the height of the ascender/descender.

Returns:
the height of the ascender/descender

setAscenderHeight

public void setAscenderHeight(double height)
Sets the height of the ascender/descender.

Parameters:
height - the height of the ascender/descender

updateHeight

protected void updateHeight()
Updates the height variable of the barcode.


getBarWidth

public double getBarWidth(int width)
Returns the effective width of a bar with a given logical width.

Specified by:
getBarWidth in class AbstractBarcodeBean
Parameters:
width - the logical width (1=narrow, 2=wide)
Returns:
the effective width of a bar (in mm)

getBarHeight

public double getBarHeight(int height)
Returns the effective height of a bar with a given logical height.

Specified by:
getBarHeight in class HeightVariableBarcodeBean
Parameters:
height - the logical height (1=short, 2=tall)
Returns:
double

barcode4j 2.1.0

Copyright © 2000-2010 Jeremias Maerki. All rights reserved.