summaryrefslogtreecommitdiffstats
path: root/src/org/uic/barcode/staticFrame/ticketLayoutBarcode
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2020-11-16 14:13:16 +0100
committerCGantert345 <57003061+CGantert345@users.noreply.github.com>2020-11-16 14:13:16 +0100
commit91118d7e2a848a903895b55adfdec0d12618b504 (patch)
tree4945f6a3816806ce94429660dbece882513e346d /src/org/uic/barcode/staticFrame/ticketLayoutBarcode
parentfix for the Android Java SDK bug in getDeclaredFields nor providing the (diff)
downloadUIC-barcode-91118d7e2a848a903895b55adfdec0d12618b504.tar
UIC-barcode-91118d7e2a848a903895b55adfdec0d12618b504.tar.gz
UIC-barcode-91118d7e2a848a903895b55adfdec0d12618b504.tar.bz2
UIC-barcode-91118d7e2a848a903895b55adfdec0d12618b504.tar.lz
UIC-barcode-91118d7e2a848a903895b55adfdec0d12618b504.tar.xz
UIC-barcode-91118d7e2a848a903895b55adfdec0d12618b504.tar.zst
UIC-barcode-91118d7e2a848a903895b55adfdec0d12618b504.zip
Diffstat (limited to 'src/org/uic/barcode/staticFrame/ticketLayoutBarcode')
-rw-r--r--src/org/uic/barcode/staticFrame/ticketLayoutBarcode/FormatType.java34
-rw-r--r--src/org/uic/barcode/staticFrame/ticketLayoutBarcode/LayoutElement.java50
-rw-r--r--src/org/uic/barcode/staticFrame/ticketLayoutBarcode/TicketLayout.java61
3 files changed, 145 insertions, 0 deletions
diff --git a/src/org/uic/barcode/staticFrame/ticketLayoutBarcode/FormatType.java b/src/org/uic/barcode/staticFrame/ticketLayoutBarcode/FormatType.java
new file mode 100644
index 0000000..e6b9414
--- /dev/null
+++ b/src/org/uic/barcode/staticFrame/ticketLayoutBarcode/FormatType.java
@@ -0,0 +1,34 @@
+package org.uic.barcode.staticFrame.ticketLayoutBarcode;
+
+
+public enum FormatType {
+ NORMAL("NORMAL"),
+ BOLD("BOLD"),
+ ITALIC("ITALIC"),
+ BOLDITALIC("BOLDITALIC"),
+ SMALL("SMALL"),
+ SMALLBOLD("SMALLBOLD"),
+ SMALLITALIC("SMALLITALIC"),
+ SMALLBOLDITALIC("SMALLBOLDITALIC");
+
+
+
+ public String text;
+
+ FormatType(String text) {
+ this.text = text;
+ }
+
+ public static FormatType getFormatType(int i) {
+ try {
+ return FormatType.values()[i];
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ public String toString(){
+ return text;
+ }
+
+}
diff --git a/src/org/uic/barcode/staticFrame/ticketLayoutBarcode/LayoutElement.java b/src/org/uic/barcode/staticFrame/ticketLayoutBarcode/LayoutElement.java
new file mode 100644
index 0000000..861629d
--- /dev/null
+++ b/src/org/uic/barcode/staticFrame/ticketLayoutBarcode/LayoutElement.java
@@ -0,0 +1,50 @@
+package org.uic.barcode.staticFrame.ticketLayoutBarcode;
+
+public class LayoutElement {
+
+ private int column;
+ private int line;
+ private int height;
+ private int width;
+ private String text;
+ private FormatType format = FormatType.NORMAL;
+
+ public int getColumn() {
+ return column;
+ }
+ public void setColumn(int column) {
+ this.column = column;
+ }
+ public int getLine() {
+ return line;
+ }
+ public void setLine(int line) {
+ this.line = line;
+ }
+ public int getHeight() {
+ return height;
+ }
+ public void setHeight(int height) {
+ this.height = height;
+ }
+ public int getWidth() {
+ return width;
+ }
+ public void setWidth(int width) {
+ this.width = width;
+ }
+ public String getText() {
+ return text;
+ }
+ public void setText(String text) {
+ this.text = text;
+ }
+ public FormatType getFormat() {
+ return format;
+ }
+ public void setFormat(FormatType format) {
+ this.format = format;
+ }
+
+
+}
diff --git a/src/org/uic/barcode/staticFrame/ticketLayoutBarcode/TicketLayout.java b/src/org/uic/barcode/staticFrame/ticketLayoutBarcode/TicketLayout.java
new file mode 100644
index 0000000..8ca8083
--- /dev/null
+++ b/src/org/uic/barcode/staticFrame/ticketLayoutBarcode/TicketLayout.java
@@ -0,0 +1,61 @@
+package org.uic.barcode.staticFrame.ticketLayoutBarcode;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TicketLayout {
+
+ private String layoutStandard = "RCT2";
+
+ /** The layout elements. */
+ private List<LayoutElement> elements = new ArrayList<LayoutElement>();
+
+
+ /**
+ * Gets the layout standard.
+ *
+ * @return the layout standard
+ */
+ public String getLayoutStandard() {
+ if (layoutStandard == null || layoutStandard.length() != 4) {
+ layoutStandard = "RCT2";
+ }
+ return layoutStandard;
+ }
+
+ /**
+ * Sets the layout standard.
+ *
+ * @param layoutStandard the new layout standard
+ */
+ public void setLayoutStandard(String layoutStandard) {
+ this.layoutStandard = layoutStandard;
+ }
+
+ /**
+ * Adds the layout element.
+ *
+ * @param element the element
+ */
+ public void addLayoutElement(LayoutElement element){
+ elements.add(element);
+ }
+
+ /**
+ * Removes the layout elements.
+ */
+ public void removeLayoutElements(){
+ elements.clear();
+ }
+
+ /**
+ * Gets the elements.
+ *
+ * @return the elements
+ */
+ public List<LayoutElement> getElements(){
+ return elements;
+ }
+
+
+}