-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBasicMap.java
More file actions
122 lines (93 loc) · 1.87 KB
/
BasicMap.java
File metadata and controls
122 lines (93 loc) · 1.87 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
package com.mobidevelop.maps.basic;
import com.mobidevelop.maps.Map;
import com.mobidevelop.maps.MapLayer;
import com.mobidevelop.maps.MapLayers;
import com.mobidevelop.maps.MapProperties;
import com.mobidevelop.maps.MapResources;
public class BasicMap implements Map {
private String name;
private float x;
private float y;
private float width;
private float height;
private MapLayers layers;
private MapProperties properties;
private MapResources resources;
@Override
public String getName() {
return name;
}
@Override
public void setName(String name) {
this.name = name;
}
@Override
public float getX() {
return x;
}
@Override
public void setX(float x) {
this.x = x;
}
@Override
public float getY() {
return y;
}
@Override
public void setY(float y) {
this.y = y;
}
@Override
public float getWidth() {
return width;
}
@Override
public void setWidth(float width) {
this.width = width;
}
@Override
public float getHeight() {
return height;
}
@Override
public void setHeight(float height) {
this.height = height;
}
@Override
public MapLayers getLayers() {
return layers;
}
@Override
public MapProperties getProperties() {
return properties;
}
@Override
public MapResources getResources() {
return resources;
}
public BasicMap() {
this(0, 0);
}
public BasicMap(float width, float height) {
this(0, 0, width, height);
}
public BasicMap(float x, float y, float width, float height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
this.layers = new MapLayers();
this.properties = new MapProperties();
this.resources = new MapResources();
}
@Override
public void dispose() {
resources.dispose();
}
@Override
public MapLayer createLayer( String name ) {
BasicMapLayer layer = new BasicMapLayer( this );
layer.setName( name );
return layer;
}
}