1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.vectomatic.common.rpc;
19
20 import org.vectomatic.common.model.Shape;
21 import org.vectomatic.common.model.style.PaletteList;
22
23 import com.google.gwt.user.client.rpc.IsSerializable;
24
25 public class Representation implements IsSerializable {
26 private int _width;
27 private int _height;
28 private String _description;
29 private String _name;
30 private Shape[] _shapeArray;
31 private PaletteList _palettes;
32 public static final int DEFAULT_DRAWING_WIDTH = 640;
33 public static final int DEFAULT_DRAWING_HEIGHT = 400;
34
35
36
37
38
39 public Representation() {
40 }
41
42 public Representation(int width, int height, String description) {
43 _width = width;
44 _height = height;
45 _description = description;
46 }
47
48
49
50
51 public void setWidth(int width) {
52 _width = width;
53 }
54 public int getWidth() {
55 return _width;
56 }
57 public void setHeight(int height) {
58 _height = height;
59 }
60 public int getHeight() {
61 return _height;
62 }
63 public void setDescription(String description) {
64 _description = description;
65 }
66 public String getDescription() {
67 return _description;
68 }
69 public String getName() {
70 return _name;
71 }
72 public void setName(String name) {
73 _name = name;
74 }
75
76
77
78
79
80 public void setShapes(Shape[] shapeArray) {
81 _shapeArray = shapeArray;
82 }
83 public Shape[] getShapes() {
84 return _shapeArray;
85 }
86 public void setPalettes(PaletteList palettes) {
87 _palettes = palettes;
88 }
89 public PaletteList getPalettes() {
90 return _palettes;
91 }
92
93
94
95
96 @Override
97 public String toString() {
98 StringBuffer buffer = new StringBuffer("Representation {width = ");
99 buffer.append(_width);
100 buffer.append("; height = ");
101 buffer.append(_height);
102 buffer.append("; description = ");
103 buffer.append(_description);
104 buffer.append(" }");
105 return buffer.toString();
106 }
107
108 }