|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sap.ip.me.api.pios.connection.ConnectionParameters
com.sap.ip.me.api.pios.printer.PrinterParameters
public final class PrinterParameters
Use a PrinterParameters class instance as a parameter to the open method of the Connector to create a printer connection. A connection object is returned. This object depends on the printer mode parameter. Each printer mode has a specific connection object. Use constant attributes names, found on PrinterConnection.Attributes, to determine if a particular printer functionality is supported.
Example: Open a connection in line mode.
Connector connector = Connector.getInstance();
DriverInfo[] printers = connector.listDrivers(ConnectionType.PRINTER);
PrinterParameters parameters = new PrinterParameters(printers[0]);
parameters.setPrinterMode(PrinterParameters.LINE_MODE);
LinePrinter lp = (LinePrinter)connector.open(parameters);
//Add some code here
lp.doPrint(1);
lp.close();
PrinterConnection,
GraphicPrinter,
LinePrinter| Field Summary | |
|---|---|
static int |
GRAPHIC_MODE
Constant to indicate a graphic mode printer. |
static int |
LINE_MODE
Constant to indicate a line mode printer. |
| Constructor Summary | |
|---|---|
PrinterParameters(DriverInfo info)
Creates a new PrinterParameters object. |
|
| Method Summary | |
|---|---|
int |
getPrinterMode()
Returns the printer mode. |
void |
setPrinterMode(int mode)
Sets the printer mode. |
| Methods inherited from class com.sap.ip.me.api.pios.connection.ConnectionParameters |
|---|
getConnection, getDriver |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LINE_MODE
public static final int GRAPHIC_MODE
| Constructor Detail |
|---|
public PrinterParameters(DriverInfo info)
info - The driver information object| Method Detail |
|---|
public void setPrinterMode(int mode)
mode - the printer modepublic int getPrinterMode()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||