net.sourceforge.barbecue.output
Class AbstractOutput

java.lang.Object
  extended bynet.sourceforge.barbecue.output.AbstractOutput
All Implemented Interfaces:
Output
Direct Known Subclasses:
EPSOutput, GraphicsOutput, SizingOutput, SVGOutput

public abstract class AbstractOutput
extends java.lang.Object
implements Output

Abstract class of which concrete implementations provide means for outputting barcodes to different output formats.

Author:
Ian Bourke

Field Summary
protected  java.awt.Color backgroundColour
          The background colour for drawing
protected  java.awt.Font font
          The font to draw any text labels with.
protected  java.awt.Color foregroundColour
          The foreground colour for drawing
protected  boolean painting
          Flag indicating whether the barcode will actually be outputted, or is just being sized.
protected  double scalar
          The scaling factor to correctly size the barcode in the output units.
 
Constructor Summary
protected AbstractOutput(java.awt.Font font, boolean painting, double scalar, java.awt.Color foregroundColour, java.awt.Color backgroundColour)
          Populates this abstract outputter with common values.
 
Method Summary
 void toggleDrawingColor()
          Disables any drawing to the Output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.barbecue.output.Output
beginDraw, drawBar, drawText, endDraw, paintBackground
 

Field Detail

painting

protected final boolean painting
Flag indicating whether the barcode will actually be outputted, or is just being sized.


scalar

protected final double scalar
The scaling factor to correctly size the barcode in the output units.


font

protected final java.awt.Font font
The font to draw any text labels with.


backgroundColour

protected java.awt.Color backgroundColour
The background colour for drawing


foregroundColour

protected java.awt.Color foregroundColour
The foreground colour for drawing

Constructor Detail

AbstractOutput

protected AbstractOutput(java.awt.Font font,
                         boolean painting,
                         double scalar,
                         java.awt.Color foregroundColour,
                         java.awt.Color backgroundColour)
Populates this abstract outputter with common values.

Parameters:
font - The font to draw text labels with
painting - Flag indicating whether painting will actually occur
scalar - The scaling factor to size the barcode into the correct units
foregroundColour - The colour to paint in
backgroundColour - The background colour
Method Detail

toggleDrawingColor

public void toggleDrawingColor()
Disables any drawing to the Output. Useful for sizing calculations.

Specified by:
toggleDrawingColor in interface Output


Copyright © 2003-2007 barbecue.sourceforge.net. All Rights Reserved.