Skip to content

Commit b86bfbe

Browse files
committed
Added font size, text style, and alignment constants for Receipt page
1 parent 13ec3b6 commit b86bfbe

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.devaccent.pax.printer.receipt;
2+
3+
import com.pax.gl.page.IPage.ILine.IUnit;
4+
import com.pax.gl.page.IPage.EAlign;
5+
6+
import java.util.Map;
7+
import java.util.HashMap;
8+
9+
public class ReceiptPageConstants {
10+
public final static Integer FONT_SIZE_XXS = 8;
11+
public final static Integer FONT_SIZE_XS = 12;
12+
public final static Integer FONT_SIZE_SM = 16;
13+
public final static Integer FONT_SIZE_MD = 24;
14+
public final static Integer FONT_SIZE_LG = 28;
15+
public final static Integer FONT_SIZE_XL = 32;
16+
17+
public final static HashMap FONT_SIZES = new HashMap() {{
18+
put("XXS", FONT_SIZE_XXS);
19+
put("XS", FONT_SIZE_XS);
20+
put("SM", FONT_SIZE_SM);
21+
put("MD", FONT_SIZE_MD);
22+
put("XL", FONT_SIZE_XL);
23+
}};
24+
25+
public final static EAlign LEFT_ALIGNMENT = EAlign.LEFT;
26+
public final static EAlign CENTER_ALIGNMENT = EAlign.CENTER;
27+
public final static EAlign RIGHT_ALIGNMENT = EAlign.RIGHT;
28+
29+
public final static HashMap ALIGNMENTS = new HashMap() {{
30+
put("LEFT", LEFT_ALIGNMENT);
31+
put("CENTER", CENTER_ALIGNMENT);
32+
put("RIGHT", RIGHT_ALIGNMENT);
33+
}};
34+
35+
public final static Integer TEXT_STYLE_BOLD = IUnit.TEXT_STYLE_BOLD;
36+
public final static Integer TEXT_STYLE_UNDERLINE = IUnit.TEXT_STYLE_UNDERLINE;
37+
public final static Integer TEXT_STYLE_NORMAL = IUnit.TEXT_STYLE_NORMAL;
38+
public final static Integer TEXT_STYLE_ITALIC = IUnit.TEXT_STYLE_ITALIC;
39+
40+
public final static HashMap TEXT_STYLES = new HashMap() {{
41+
put("NORMAL", TEXT_STYLE_NORMAL);
42+
put("BOLD", TEXT_STYLE_BOLD);
43+
put("ITALIC", TEXT_STYLE_ITALIC);
44+
put("UNDERLINE", TEXT_STYLE_UNDERLINE);
45+
}};
46+
}

0 commit comments

Comments
 (0)