Class CustomerDisplay
java.lang.Object
com.codename1.pos.CustomerDisplay
A customer-facing pole display with the Epson DM-D (ESC/POS) command set, two lines of 20 characters by default, as most VFD and LCD pole displays accept.
Its calls block; run them off the EDT.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the display.voidsetWidth(int width) Characters per line.voidShows two lines, each cut or padded to the width.voidshowAmount(String label, String amount) Shows a label on the left of the top line and an amount on the right of the bottom line, the usual "item / total" layout.
-
Constructor Details
-
CustomerDisplay
Parameters
link: the connection, usually serial or USB
-
-
Method Details
-
setWidth
public void setWidth(int width) Characters per line. Defaults to 20.
Parameters
width: the display's line width
-
clear
Clears the display.
Throws
IOException: when the display cannot be reached
- Throws:
IOException
-
show
Shows two lines, each cut or padded to the width.
Parameters
-
top: the first line -
bottom: the second line
Throws
IOException: when the display cannot be reached
- Throws:
IOException
-
-
showAmount
Shows a label on the left of the top line and an amount on the right of the bottom line, the usual "item / total" layout.
Parameters
-
label: the item or "TOTAL" -
amount: the formatted amount
Throws
IOException: when the display cannot be reached
- Throws:
IOException
-
-