Revision 2544
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/View.java | ||
---|---|---|
138 | 138 |
*/ |
139 | 139 |
public void setModel(ProjectView model) { |
140 | 140 |
this.modelo = model; |
141 |
|
|
142 | 141 |
//Se registra como listener de cambios en FMap |
143 | 142 |
FMap fmap = modelo.getMapContext(); |
144 | 143 |
|
... | ... | |
181 | 180 |
|
182 | 181 |
// m_MapControl.setAcceptEvents(true); Lo comento porque ya se hace en el setModel |
183 | 182 |
m_TOC = new TOC(); |
184 |
|
|
183 |
|
|
185 | 184 |
JSplitPane tempMainSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); |
186 | 185 |
tempMainSplit.setPreferredSize(new Dimension(500, 300)); |
187 | 186 |
|
... | ... | |
339 | 338 |
*/ |
340 | 339 |
public void viewActivated() { |
341 | 340 |
PluginServices.getMainFrame().getStatusBar().setMessage("1", |
342 |
FConstant.NAMES[getMapControl().getMapContext().getViewPort().getMapUnits()]);
|
|
341 |
FConstant.NAMES[getMapControl().getMapContext().getViewPort().getDistanceUnits()]);
|
|
343 | 342 |
PluginServices.getMainFrame().getStatusBar().setMessage("6", "1:"+m_MapControl.getMapContext().getScaleView()); |
344 | 343 |
PluginServices.getMainFrame().getStatusBar().setMessage("7", getMapControl().getViewPort().getProjection().getAbrev()); |
345 | 344 |
} |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/toolListeners/AreaListener.java | ||
---|---|---|
45 | 45 |
import java.text.NumberFormat; |
46 | 46 |
|
47 | 47 |
import com.iver.andami.PluginServices; |
48 |
import com.iver.cit.gvsig.fmap.FMap; |
|
48 | 49 |
import com.iver.cit.gvsig.fmap.MapControl; |
49 | 50 |
import com.iver.cit.gvsig.fmap.ViewPort; |
50 | 51 |
import com.iver.cit.gvsig.fmap.tools.AreaListenerImpl; |
... | ... | |
99 | 100 |
NumberFormat nf = NumberFormat.getInstance(); |
100 | 101 |
nf.setMaximumFractionDigits(2); |
101 | 102 |
PluginServices.getMainFrame().getStatusBar().setMessage("4", |
102 |
"P:" + nf.format(distAll) + ""); |
|
103 |
"P:" + nf.format(distAll/FMap.CHANGEM[mapCtrl.getViewPort().getDistanceUnits()]) + "");
|
|
103 | 104 |
PluginServices.getMainFrame().getStatusBar().setMessage("5", |
104 | 105 |
"A:" + nf.format(returnArea(vp.toMapPoint( |
105 | 106 |
new Point2D.Double( |
106 | 107 |
event.getXs()[event.getXs().length - 2].doubleValue(), |
107 |
event.getYs()[event.getYs().length - 2].doubleValue())))) + ""); |
|
108 |
event.getYs()[event.getYs().length - 2].doubleValue())))/FMap.CHANGEM[mapCtrl.getViewPort().getDistanceUnits()]) + "");
|
|
108 | 109 |
} |
109 | 110 |
|
110 | 111 |
|
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/toolListeners/StatusBarListener.java | ||
---|---|---|
45 | 45 |
import java.text.NumberFormat; |
46 | 46 |
|
47 | 47 |
import org.cresques.cts.IProjection; |
48 |
import org.cresques.geo.Geodetic; |
|
49 |
import org.cresques.geo.Projection; |
|
50 |
import org.cresques.geo.UtmZone; |
|
51 | 48 |
|
52 | 49 |
import com.iver.andami.PluginServices; |
53 | 50 |
import com.iver.andami.ui.mdiFrame.MainFrame; |
51 |
import com.iver.cit.gvsig.fmap.FMap; |
|
54 | 52 |
import com.iver.cit.gvsig.fmap.MapControl; |
53 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
|
55 | 54 |
import com.iver.cit.gvsig.fmap.tools.BehaviorException; |
56 | 55 |
import com.iver.cit.gvsig.fmap.tools.Events.PointEvent; |
57 | 56 |
import com.iver.cit.gvsig.fmap.tools.Listeners.PointListener; |
... | ... | |
105 | 104 |
setFractionDigits(p); |
106 | 105 |
axisText = setCoorDisplayText(axisText); |
107 | 106 |
MainFrame mF = PluginServices.getMainFrame(); |
107 |
|
|
108 |
PluginServices.getMainFrame().getStatusBar().setMessage("1", |
|
109 |
FConstant.NAMES[mapControl.getMapContext().getViewPort().getDistanceUnits()]); |
|
110 |
PluginServices.getMainFrame().getStatusBar().setMessage("6", "1:"+mapControl.getMapContext().getScaleView()); |
|
111 |
PluginServices.getMainFrame().getStatusBar().setMessage("7", mapControl.getViewPort().getProjection().getAbrev()); |
|
112 |
|
|
113 |
|
|
108 | 114 |
if (mF != null) |
109 | 115 |
{ |
110 | 116 |
mF.getStatusBar().setMessage("2", |
111 |
axisText[0] + String.valueOf(nf.format(p.getX()))); |
|
117 |
axisText[0] + String.valueOf(nf.format(p.getX()/FMap.CHANGEM[mapControl.getViewPort().getDistanceUnits()])));
|
|
112 | 118 |
mF.getStatusBar().setMessage("3", |
113 |
axisText[1] + String.valueOf(nf.format(p.getY()))); |
|
119 |
axisText[1] + String.valueOf(nf.format(p.getY()/FMap.CHANGEM[mapControl.getViewPort().getDistanceUnits()])));
|
|
114 | 120 |
} |
115 | 121 |
} |
116 | 122 |
|
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/toolListeners/MeasureListener.java | ||
---|---|---|
45 | 45 |
import java.text.NumberFormat; |
46 | 46 |
|
47 | 47 |
import com.iver.andami.PluginServices; |
48 |
import com.iver.cit.gvsig.fmap.FMap; |
|
48 | 49 |
import com.iver.cit.gvsig.fmap.MapControl; |
49 | 50 |
import com.iver.cit.gvsig.fmap.ViewPort; |
50 | 51 |
import com.iver.cit.gvsig.fmap.tools.MeasureListenerImpl; |
... | ... | |
93 | 94 |
nf.setMaximumFractionDigits(2); |
94 | 95 |
|
95 | 96 |
PluginServices.getMainFrame().getStatusBar().setMessage("4", |
96 |
"Dist:" + nf.format(dist) + ""); |
|
97 |
"Dist:" + nf.format(dist/FMap.CHANGEM[mapCtrl.getViewPort().getDistanceUnits()]) + "");
|
|
97 | 98 |
PluginServices.getMainFrame().getStatusBar().setMessage("5", |
98 |
"Total:" + nf.format(distAll) + ""); |
|
99 |
"Total:" + nf.format(distAll/FMap.CHANGEM[mapCtrl.getViewPort().getDistanceUnits()]) + "");
|
|
99 | 100 |
} |
100 | 101 |
} |
Also available in: Unified diff