Revision 9532 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/ViewControls.java
ViewControls.java | ||
---|---|---|
53 | 53 |
import com.iver.andami.plugins.Extension; |
54 | 54 |
import com.iver.andami.preferences.IPreference; |
55 | 55 |
import com.iver.andami.preferences.IPreferenceExtension; |
56 |
import com.iver.andami.ui.mdiManager.IWindow; |
|
56 | 57 |
import com.iver.cit.gvsig.fmap.DriverException; |
57 | 58 |
import com.iver.cit.gvsig.fmap.MapContext; |
58 | 59 |
import com.iver.cit.gvsig.fmap.MapControl; |
... | ... | |
60 | 61 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
61 | 62 |
import com.iver.cit.gvsig.gui.preferencespage.ViewPage; |
62 | 63 |
import com.iver.cit.gvsig.project.Project; |
64 |
import com.iver.cit.gvsig.project.documents.ProjectDocument; |
|
63 | 65 |
import com.iver.cit.gvsig.project.documents.view.Encuadrator; |
64 | 66 |
import com.iver.cit.gvsig.project.documents.view.IProjectView; |
65 | 67 |
import com.iver.cit.gvsig.project.documents.view.gui.ExtentListSelectorModel; |
... | ... | |
100 | 102 |
// mapa.beginAtomicEvent(); |
101 | 103 |
mapa.getViewPort().setExtent(mapa.getLayers().getFullExtent()); |
102 | 104 |
vista.repaintMap(); |
105 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
103 | 106 |
// mapa.endAtomicEvent(); |
104 | 107 |
} catch (DriverException e) { |
105 | 108 |
NotificationManager.addError("Error obteniendo el full extent", |
... | ... | |
115 | 118 |
project.addPropertyChangeListener(modelo); |
116 | 119 |
l.setModel(modelo); |
117 | 120 |
l.addSelectionListener(new Encuadrator(project, mapa, vista)); |
121 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
118 | 122 |
PluginServices.getMDIManager().addWindow(l); |
119 | 123 |
} else if (s.equals("CONFIG_LOCATOR") ) { |
120 | 124 |
//Set up the map overview |
121 | 125 |
FPanelLocConfig m_panelLoc = new FPanelLocConfig(vista.getMapOverview()); |
122 | 126 |
PluginServices.getMDIManager().addWindow(m_panelLoc); |
123 | 127 |
m_panelLoc.setPreferredSize(m_panelLoc.getSize()); |
128 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
124 | 129 |
} else if (s.equals("PAN") ) { |
125 | 130 |
mapCtrl.setTool("pan"); |
131 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
126 | 132 |
} else if (s.equals("ZOOM_IN") ) { |
127 | 133 |
mapCtrl.setTool("zoomIn"); |
134 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
128 | 135 |
} else if (s.equals("ZOOM_OUT") ) { |
129 | 136 |
mapCtrl.setTool("zoomOut"); |
137 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
130 | 138 |
} else if (s.equals("MEDICION") ) { |
131 | 139 |
mapCtrl.setTool("medicion"); |
132 | 140 |
} else if (s.equals("AREA") ) { |
133 | 141 |
mapCtrl.setTool("area"); |
134 | 142 |
} else if (s.equals("CAPAS_VISIBLES") ) { |
135 | 143 |
setVisibles(true, mapa); |
144 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
136 | 145 |
} else if (s.equals("CAPAS_NOVISIBLES") ) { |
137 | 146 |
setVisibles(false, mapa); |
147 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
138 | 148 |
} else if (s.equals("CAPAS_ACTIVAS") ) { |
139 | 149 |
setActives(true, mapa); |
150 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
140 | 151 |
} else if (s.equals("CAPAS_NOACTIVAS") ) { |
141 | 152 |
setActives(false, mapa); |
153 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
142 | 154 |
} else if (s.equals("SAVERASTER") ) { |
143 | 155 |
mapCtrl.setTool("saveRaster"); |
144 | 156 |
} else if (s.equals("SELECTIMAGE") ) { |
145 | 157 |
mapCtrl.setTool("selectImage"); |
146 | 158 |
} else if (s.equals("ACTION_ZOOM_IN") ) { |
147 | 159 |
mapCtrl.zoomIn(); |
160 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
148 | 161 |
} else if (s.equals("ACTION_ZOOM_OUT") ) { |
149 | 162 |
mapCtrl.zoomOut(); |
163 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
150 | 164 |
} else if (s.startsWith("CHANGE_SCALE_")){ |
151 | 165 |
String scl=s.replaceAll("CHANGE_SCALE_",""); |
152 | 166 |
long scale=Long.parseLong(scl); |
153 | 167 |
mapa.setScaleView(scale); |
168 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
154 | 169 |
} |
155 | 170 |
} |
156 | 171 |
|
Also available in: Unified diff