public class Print extends Extension implements Printable
Modifier and Type | Field and Description |
---|---|
static PrinterJob |
printerJob |
NO_SUCH_PAGE, PAGE_EXISTS
Constructor and Description |
---|
Print() |
Modifier and Type | Method and Description |
---|---|
void |
doPrint(LayoutPanel layoutPanel) |
void |
drawShapes(Graphics2D g2)
Se dibuja sobre el graphics el Layout.
|
void |
execute(String s)
This method is executed when the user clicks on any of the
controls associated with this extension (menus, tools, etc).
|
void |
initialize()
Extension's initialization code should be here.
|
boolean |
isEnabled()
This method is invoked by Andami to check whether the extension
(and its associated controls) is enabled or disabled.
|
boolean |
isVisible()
This method is invoked by Andami to check whether the extension
(and its associated controls) is visible or hidden.
|
void |
openDialogToPrint(LayoutPanel layoutPanel)
Abre un diálogo para imprimir.
|
int |
print(Graphics g,
PageFormat format,
int pi) |
void |
printLayout(LayoutPanel layoutPanel)
Imprime el Layout que se pasa como parámetro.
|
void |
setLayout(LayoutPanel layoutp) |
public static PrinterJob printerJob
public void execute(String s)
IExtension
execute
in interface IExtension
s
- An String specifying the action to
execute. This is useful when there are different
controls associated with the same extension.public void doPrint(LayoutPanel layoutPanel)
public void setLayout(LayoutPanel layoutp)
public boolean isVisible()
IExtension
isVisible
in interface IExtension
public boolean isEnabled()
IExtension
isEnabled
in interface IExtension
public void initialize()
IExtension
initialize
in interface IExtension
public void openDialogToPrint(LayoutPanel layoutPanel)
layout
- Layout a imprimir.public void printLayout(LayoutPanel layoutPanel)
layout
- Layout a imprimir.public void drawShapes(Graphics2D g2)
g2
- graphics sobre el que se dibuja.public int print(Graphics g, PageFormat format, int pi) throws PrinterException
print
in interface Printable
PrinterException