summaryrefslogtreecommitdiffstats
path: root/src/org/uic/barcode/staticFrame/ticketLayoutBarcode/TicketLayout.java
blob: 8ca8083d4ed31fe7fc0c091d9263fdbb29ed7a05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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;
	}
	

}