|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.view.print.LyPrintManager
leon.view.win.swing.LySwingPrintManager
public class LySwingPrintManager
Interface for AWT and Swing printing.
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Fields inherited from class leon.view.print.LyPrintManager |
---|
BOTTOM_MARGIN, DEBUG_TO_SCREEN, LEFT_MARGIN, PAGE_HEIGHT, PAGE_WIDTH, PRINT_TABLE_FONT_REDUCTION, RIGHT_MARGIN, TOP_MARGIN |
Constructor Summary | |
---|---|
LySwingPrintManager(LyEnvironment environment,
LyPrintDataInterface printDataInterface,
java.util.Properties properties)
Class constructor of a print manager object. |
Method Summary | |
---|---|
void |
end()
(non-Javadoc). |
static java.lang.String |
formatString(java.lang.String str,
java.awt.FontMetrics fm,
int width,
char sep)
Formats the specified string before drawing it to the output. |
static java.awt.Dimension |
getSize(java.lang.String str,
java.awt.FontMetrics fm)
Gets the size of a String, in pixels, for the specified font. |
int |
print(java.lang.Object object,
java.util.Vector<java.lang.Object> fields,
int fontReduction,
int startPage)
Prints a LyObject instance. |
void |
print(java.util.Vector<LyObject> objects,
java.util.Vector<java.lang.Object> fields,
int fontReduction)
(non-Javadoc). |
static int |
printFooter(java.awt.Component component,
java.awt.Graphics g,
java.awt.Dimension size,
java.lang.String left_str,
java.lang.String middle_str,
java.lang.String right_str,
LyEnvironment environment)
Draws the footer of the view. |
static int |
printHeader(java.awt.Component component,
java.awt.Graphics g,
java.awt.Dimension size,
java.lang.String left_logo,
java.lang.String title,
java.lang.String right_logo,
LyEnvironment environment)
Draws the page header with a logo to the left, title in the middle and logo to the right. |
boolean |
wasCancelled()
(non-Javadoc). |
Methods inherited from class leon.view.print.LyPrintManager |
---|
getEnvironment, getFormat, getSupportName, isInFile |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
Constructor Detail |
---|
public LySwingPrintManager(LyEnvironment environment, LyPrintDataInterface printDataInterface, java.util.Properties properties)
environment
- the current environmentprintDataInterface
- the interface to use for printingproperties
- the properties of the printing managerMethod Detail |
---|
public static int printHeader(java.awt.Component component, java.awt.Graphics g, java.awt.Dimension size, java.lang.String left_logo, java.lang.String title, java.lang.String right_logo, LyEnvironment environment)
component
- client component that handle imagesg
- printer handlersize
- usable print size in the viewleft_logo
- the left logo image nametitle
- centered titleright_logo
- the right logo image nameenvironment
- the current environment
public static int printFooter(java.awt.Component component, java.awt.Graphics g, java.awt.Dimension size, java.lang.String left_str, java.lang.String middle_str, java.lang.String right_str, LyEnvironment environment)
component
- client componentg
- printer handlersize
- usable print size in the viewleft_str
- the left messagemiddle_str
- the center messageright_str
- the right messageenvironment
- the current environment, not used in this implementation
public static java.awt.Dimension getSize(java.lang.String str, java.awt.FontMetrics fm)
str
- the original Stringfm
- the font metrics used to compute the string size
public static java.lang.String formatString(java.lang.String str, java.awt.FontMetrics fm, int width, char sep)
str
- the string to printfm
- the font metrics of the current fontwidth
- the maximum width of the drawingsep
- character separator used to aggregate the result
public void end()
end
in class LyPrintManager
LyPrintManager.end()
public boolean wasCancelled()
wasCancelled
in class LyPrintManager
LyPrintManager.wasCancelled()
public int print(java.lang.Object object, java.util.Vector<java.lang.Object> fields, int fontReduction, int startPage)
print
in class LyPrintManager
object
- the LyObject to printfields
- the list of fields to printfontReduction
- font reduction factorstartPage
- the page number to start printing
LyPrintManager.print(Object, Vector, int, int)
public void print(java.util.Vector<LyObject> objects, java.util.Vector<java.lang.Object> fields, int fontReduction)
print
in class LyPrintManager
objects
- List of printed objects.fields
- List of printed fieldsfontReduction
- Font reduction factor.LyPrintManager.print(java.util.Vector, java.util.Vector, int)
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |