public class PrinterManager
extends java.lang.Object
HashMapprinterAttributes = new HashMap<>(); printerAttributes.put(PrinterAttributes.KEY_ALIGN, PrinterAttributes.VAL_ALIGN_CENTER); printerAttributes.put(PrinterAttributes.KEY_TYPEFACE, 1); printerAttributes.put(PrinterAttributes.KEY_TEXT_SIZE, 20); String textToPrint = "TEXT TO PRINT"; PrinterManager.getInstance() .printText(textToPrint, printerAttributes);
Modifier and Type | Method and Description |
---|---|
static PrinterManager |
getInstance() |
void |
printText(java.lang.String textToPrint,
java.util.Map<java.lang.String,java.lang.Integer> printerAttributes) |
public static PrinterManager getInstance()
public void printText(java.lang.String textToPrint, java.util.Map<java.lang.String,java.lang.Integer> printerAttributes)