Revision 17629
trunk/extensions/extGraph/src/com/iver/cit/gvsig/graph/ServiceAreaController.java | ||
---|---|---|
1 |
package com.iver.cit.gvsig.graph; |
|
2 |
|
|
3 |
import java.util.logging.Logger; |
|
4 |
|
|
5 |
import com.iver.cit.gvsig.graph.gui.wizard.servicearea.AbstractPointsModel; |
|
6 |
|
|
7 |
public class ServiceAreaController { |
|
8 |
|
|
9 |
private AbstractPointsModel model; |
|
10 |
private boolean fusionAreas; |
|
11 |
private boolean ringAreas; |
|
12 |
private boolean compactAreas; |
|
13 |
|
|
14 |
private Logger logger; |
|
15 |
|
|
16 |
public ServiceAreaController(){ |
|
17 |
this.setModel(null); |
|
18 |
this.setFusionAreas(false); |
|
19 |
this.setCompactAreas(false); |
|
20 |
this.setRingAreas(false); |
|
21 |
|
|
22 |
this.logger=Logger.getLogger(this.getClass().getName()); |
|
23 |
} |
|
24 |
|
|
25 |
public ServiceAreaController(AbstractPointsModel model, boolean fusionArea, boolean ringAreas, boolean compactAreas){ |
|
26 |
this.setModel(model); |
|
27 |
this.setFusionAreas(fusionAreas); |
|
28 |
this.setRingAreas(ringAreas); |
|
29 |
this.setCompactAreas(compactAreas); |
|
30 |
} |
|
31 |
|
|
32 |
public void setModel(AbstractPointsModel model){ |
|
33 |
this.model=model; |
|
34 |
} |
|
35 |
|
|
36 |
public AbstractPointsModel getModel(){ |
|
37 |
return this.model; |
|
38 |
} |
|
39 |
|
|
40 |
public void setFusionAreas(boolean fusionAreas){ |
|
41 |
this.fusionAreas=fusionAreas; |
|
42 |
} |
|
43 |
|
|
44 |
public boolean getFusionAreas(){ |
|
45 |
return this.fusionAreas; |
|
46 |
} |
|
47 |
|
|
48 |
public void setRingAreas(boolean ringAreas){ |
|
49 |
this.ringAreas=ringAreas; |
|
50 |
} |
|
51 |
|
|
52 |
public boolean getRingAreas(){ |
|
53 |
return this.ringAreas; |
|
54 |
} |
|
55 |
|
|
56 |
public void setCompactAreas(boolean compactAreas){ |
|
57 |
this.compactAreas=compactAreas; |
|
58 |
} |
|
59 |
|
|
60 |
public boolean getCompactAreas(){ |
|
61 |
return this.compactAreas; |
|
62 |
} |
|
63 |
|
|
64 |
public void solve(){ |
|
65 |
this.logger.info("Resolviendo:\n" + |
|
66 |
this.model+"\n"+ |
|
67 |
"Fusionar Areas: "+this.fusionAreas+"\n"+ |
|
68 |
"Areas anillo: "+this.ringAreas+"\n"+ |
|
69 |
"Areas compactas: "+this.compactAreas); |
|
70 |
} |
|
71 |
} |
Also available in: Unified diff