|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.barbecue.output.AbstractOutput
net.sourceforge.barbecue.output.GraphicsOutput
Graphics based outputter to draw barcodes to Graphics objects for printing and display.
| Field Summary | |
static int |
BARS_TEXT_VGAP
Pixel gap between the barcode bars and the top of the data text underneath |
| Fields inherited from class net.sourceforge.barbecue.output.AbstractOutput |
backgroundColour, barHeight, font, foregroundColour, painting, scalar |
| Constructor Summary | |
GraphicsOutput(java.awt.Graphics2D graphics,
java.awt.Font font,
double barWidth,
double barHeight,
boolean paint,
java.awt.Color fgColor,
java.awt.Color bgColor)
Creates a Graphics2D AbstractOutput |
|
| Method Summary | |
void |
beginDraw(double width,
double height)
From AbstractOutput - Does nothing. |
void |
drawBar(int x,
int y,
int width,
int height,
boolean paintWithForegroundColor)
From AbstractOutput - Draws a bar at the given coordinates onto the output Graphics. |
double |
drawText(java.lang.String text,
double x,
double y,
double width)
From AbstractOutput - Draw the specified text to the output graphics. |
void |
endDraw()
From AbstractOutput - Does nothing. |
| Methods inherited from class net.sourceforge.barbecue.output.AbstractOutput |
getBackgroundColour, getBarHeight, getBarWidth, getForegroundColour, setupForBlankDrawing, teardownFromBlankDrawing |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int BARS_TEXT_VGAP
| Constructor Detail |
public GraphicsOutput(java.awt.Graphics2D graphics,
java.awt.Font font,
double barWidth,
double barHeight,
boolean paint,
java.awt.Color fgColor,
java.awt.Color bgColor)
graphics - The graphics to output tofont - The font for text renderingbarWidth - The width of the smallest barbarHeight - The height of the barcodepaint - If true, we are drawing, if false we are calculatingfgColor - Foreground ColorbgColor - Background Color| Method Detail |
public void beginDraw(double width,
double height)
beginDraw in class AbstractOutputwidth - The output width (in pixels) of the barcodeheight - The output height (in pixels) of the barcode.public void endDraw()
endDraw in class AbstractOutput
public void drawBar(int x,
int y,
int width,
int height,
boolean paintWithForegroundColor)
drawBar in class AbstractOutputx - the x coordinatey - the y coordinatewidth - the widthheight - the heightpaintWithForegroundColor - if true, use the foreground color, otherwise use the background color
public double drawText(java.lang.String text,
double x,
double y,
double width)
drawText in class AbstractOutputtext - The text to drawx - The x positiony - The y positionwidth - The width of barcode (total)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||