|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.barbecue.output.AbstractOutput net.sourceforge.barbecue.output.GraphicsOutput
Graphics based outputter to draw barcodes to Graphics objects for printing and display.
Field Summary |
Fields inherited from class net.sourceforge.barbecue.output.AbstractOutput |
backgroundColour, font, foregroundColour, painting, scalar |
Constructor Summary | |
GraphicsOutput(java.awt.Graphics2D graphics,
java.awt.Font font,
java.awt.Color fgColor,
java.awt.Color bgColor)
Creates a Graphics2D AbstractOutput |
Method Summary | |
void |
beginDraw()
From AbstractOutput - Saves current colour. |
int |
drawBar(int x,
int y,
int width,
int height,
boolean paintWithForegroundColor)
From AbstractOutput - Draws a bar at the given coordinates onto the output Graphics. |
int |
drawText(java.lang.String text,
LabelLayout labelLayout)
Draw the specified text. |
void |
endDraw(int width,
int height)
From AbstractOutput - Restores colour. |
void |
paintBackground(int x,
int y,
int width,
int height)
Paint the background the background colour, based on the height and the width. |
Methods inherited from class net.sourceforge.barbecue.output.AbstractOutput |
toggleDrawingColor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GraphicsOutput(java.awt.Graphics2D graphics, java.awt.Font font, java.awt.Color fgColor, java.awt.Color bgColor)
graphics
- The graphics to output tofont
- The font for text renderingfgColor
- Foreground ColorbgColor
- Background ColorMethod Detail |
public void beginDraw()
public void endDraw(int width, int height)
width
- The output width (in pixels) of the barcodeheight
- The output height (in pixels) of the barcodepublic int drawBar(int x, int y, int width, int height, boolean paintWithForegroundColor)
x
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the heightpaintWithForegroundColor
- if true, use the foreground color, otherwise use the background color
public int drawText(java.lang.String text, LabelLayout labelLayout) throws OutputException
Output
text
- text to drawlabelLayout
- the text layout calculator
OutputException
public void paintBackground(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the width to be paintedheight
- the height to be painted
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |