use of com.example.alphatour.oggetti.MapZoneAndObject in project AlphaTour by Frank99DG.
the class Step4 method clear_Zones.
private void clear_Zones() {
Iterator<MapZoneAndObject> it = zoneAndObjectList_.iterator();
while (it.hasNext()) {
MapZoneAndObject zone = it.next();
String delete = "delete";
if (delete.matches(zone.getZone())) {
it.remove();
}
}
}
use of com.example.alphatour.oggetti.MapZoneAndObject in project AlphaTour by Frank99DG.
the class Step5 method savePath.
private void savePath() {
progressBar.setVisibility(View.VISIBLE);
List<MapZoneAndObject> zoneAndObjectList = zoneAndObjectList_;
MapZoneAndObject mapZoneAndOb = zoneAndObjectList.get(0);
Path path = new Path();
path.setName(mapZoneAndOb.getName());
path.setDescription(mapZoneAndOb.getDescription());
path.setIdUser(user.getUid());
for (int i = 0; i < zoneAndObjectList_.size(); i++) {
MapZoneAndObject mapZoneAndObject = zoneAndObjectList.get(i);
// String delete = "delete";
// if(!mapZoneAndObject.getZone().matches(delete)) {
ZoneChoosed zoneChoosed = new ZoneChoosed();
zoneChoosed.setName(mapZoneAndObject.getZone());
List<String> obj = mapZoneAndObject.getListObj();
for (int j = 0; j < obj.size(); j++) {
zoneChoosed.setObjectChoosed(obj.get(j));
}
graph.addVertex(zoneChoosed);
zoneChooseds.add(zoneChoosed);
if (i >= 1) {
graph.addEdge(zoneChooseds.get(i - 1), zoneChooseds.get(i));
}
path.setZonePath(zoneChoosed);
// }
}
}
Aggregations