Revision 6720
trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/preferences/GridPage.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.1 2006-08-10 08:18:35 caballero |
|
46 |
* Revision 1.2 2006-08-10 11:13:02 caballero |
|
47 |
* mostrar unidades |
|
48 |
* |
|
49 |
* Revision 1.1 2006/08/10 08:18:35 caballero |
|
47 | 50 |
* configurar grid |
48 | 51 |
* |
49 | 52 |
* Revision 1.1 2006/08/04 11:41:05 caballero |
... | ... | |
107 | 110 |
import com.iver.andami.preferences.AbstractPreferencePage; |
108 | 111 |
import com.iver.andami.preferences.StoreException; |
109 | 112 |
import com.iver.cit.gvsig.CADExtension; |
113 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
114 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
|
110 | 115 |
import com.iver.cit.gvsig.gui.cad.CADGrid; |
111 | 116 |
import com.iver.cit.gvsig.gui.cad.CADToolAdapter; |
112 | 117 |
|
... | ... | |
127 | 132 |
addComponent(chkShowGrid); |
128 | 133 |
chkAdjustGrid=new JCheckBox(PluginServices.getText(this,"ajustar_rejilla")); |
129 | 134 |
addComponent(chkAdjustGrid); |
135 |
addComponent(lblUnits); |
|
136 |
|
|
130 | 137 |
// distance x |
131 |
addComponent(lblUnits); |
|
132 | 138 |
addComponent(PluginServices.getText(this, "distance_x") + ":", |
133 | 139 |
txtDistanceX = new JTextField("", 15)); |
134 | 140 |
// distance y |
... | ... | |
140 | 146 |
public void initializeValues() { |
141 | 147 |
cta=CADExtension.getCADToolAdapter(); |
142 | 148 |
cta.initializeGrid(); |
149 |
ViewPort vp=cta.getMapControl().getViewPort(); |
|
143 | 150 |
// boolean showGrid = prefs.getBoolean("grid.showgrid",cta.getGrid().isShowGrid()); |
144 | 151 |
// boolean adjustGrid = prefs.getBoolean("grid.adjustgrid",cta.getGrid().isAdjustGrid()); |
145 | 152 |
// |
... | ... | |
150 | 157 |
chkAdjustGrid.setSelected(cg.isAdjustGrid()); |
151 | 158 |
txtDistanceX.setText(String.valueOf(cg.getGridSizeX())); |
152 | 159 |
txtDistanceY.setText(String.valueOf(cg.getGridSizeY())); |
153 |
lblUnits.setText(PluginServices.getText(this,"Unidades")); |
|
160 |
lblUnits.setText(PluginServices.getText(this,"Unidades")+ " "+PluginServices.getText(this,FConstant.NAMES[vp.getDistanceUnits()])); |
|
161 |
|
|
154 | 162 |
// cta.setGridVisibility(showGrid); |
155 | 163 |
// cta.setAdjustGrid(adjustGrid); |
156 | 164 |
// cta.getGrid().setGridSizeX(dx); |
... | ... | |
202 | 210 |
public void initializeDefaults() { |
203 | 211 |
chkShowGrid.setSelected(cta.getGrid().isShowGrid()); |
204 | 212 |
chkAdjustGrid.setSelected(cta.getGrid().isAdjustGrid()); |
213 |
ViewPort vp=cta.getMapControl().getViewPort(); |
|
214 |
lblUnits.setText(PluginServices.getText(this,"Unidades")+ " "+PluginServices.getText(this,FConstant.NAMES[vp.getDistanceUnits()])); |
|
205 | 215 |
txtDistanceX.setText(String.valueOf(cta.getGrid().getGridSizeX())); |
206 | 216 |
txtDistanceY.setText(String.valueOf(cta.getGrid().getGridSizeY())); |
207 | 217 |
} |
Also available in: Unified diff