summaryrefslogtreecommitdiffstats
path: root/src/org/uic/barcode/staticHeader/ticketLayoutBarcode
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/org/uic/barcode/staticHeader/ticketLayoutBarcode/FormatType.java34
-rw-r--r--src/org/uic/barcode/staticHeader/ticketLayoutBarcode/LayoutElement.java50
-rw-r--r--src/org/uic/barcode/staticHeader/ticketLayoutBarcode/TicketLayout.java61
3 files changed, 145 insertions, 0 deletions
diff --git a/src/org/uic/barcode/staticHeader/ticketLayoutBarcode/FormatType.java b/src/org/uic/barcode/staticHeader/ticketLayoutBarcode/FormatType.java
new file mode 100644
index 0000000..c5cc39e
--- /dev/null
+++ b/src/org/uic/barcode/staticHeader/ticketLayoutBarcode/FormatType.java
@@ -0,0 +1,34 @@
+package org.uic.barcode.staticHeader.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/staticHeader/ticketLayoutBarcode/LayoutElement.java b/src/org/uic/barcode/staticHeader/ticketLayoutBarcode/LayoutElement.java
new file mode 100644
index 0000000..04593f2
--- /dev/null
+++ b/src/org/uic/barcode/staticHeader/ticketLayoutBarcode/LayoutElement.java
@@ -0,0 +1,50 @@
+package org.uic.barcode.staticHeader.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/staticHeader/ticketLayoutBarcode/TicketLayout.java b/src/org/uic/barcode/staticHeader/ticketLayoutBarcode/TicketLayout.java
new file mode 100644
index 0000000..e788f9a
--- /dev/null
+++ b/src/org/uic/barcode/staticHeader/ticketLayoutBarcode/TicketLayout.java
@@ -0,0 +1,61 @@
+package org.uic.barcode.staticHeader.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;
+ }
+
+
+}