|
|||||||||||
| 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.SizingOutput
The SizingOutput class is used to calculate the size of a barcode.
This class will not generate any output.
| Field Summary |
| Fields inherited from class net.sourceforge.barbecue.output.AbstractOutput |
backgroundColour, font, foregroundColour, painting, scalar |
| Constructor Summary | |
SizingOutput(java.awt.Font font,
java.awt.Color fgColor,
java.awt.Color bgColor)
|
|
SizingOutput(java.awt.Font font,
java.awt.FontMetrics fm,
java.awt.Color fgColor,
java.awt.Color bgColor)
|
|
| Method Summary | |
void |
beginDraw()
Sets up the drawing environment. |
int |
drawBar(int x,
int y,
int width,
int height,
boolean paintWithForegroundColor)
"Draws" a bar at the given coordinates. |
int |
drawText(java.lang.String text,
LabelLayout labelLayout)
Draw the specified text. |
void |
endDraw(int width,
int height)
Balanced with startDraw() above, used for caching, output of epilogues (for SVG), etc. |
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 SizingOutput(java.awt.Font font,
java.awt.Color fgColor,
java.awt.Color bgColor)
public SizingOutput(java.awt.Font font,
java.awt.FontMetrics fm,
java.awt.Color fgColor,
java.awt.Color bgColor)
| Method Detail |
public 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 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 barcode.
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 | ||||||||||