Revision 6713 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/CADToolAdapter.java
CADToolAdapter.java | ||
---|---|---|
19 | 19 |
import java.util.ArrayList; |
20 | 20 |
import java.util.HashMap; |
21 | 21 |
import java.util.Stack; |
22 |
import java.util.prefs.Preferences; |
|
22 | 23 |
|
23 | 24 |
import org.cresques.cts.IProjection; |
24 | 25 |
|
... | ... | |
97 | 98 |
private boolean bOrtoMode; |
98 | 99 |
|
99 | 100 |
private Color theTipColor = new Color(255, 255, 155); |
101 |
private static Preferences prefs = Preferences.userRoot().node( "cadtooladapter" ); |
|
100 | 102 |
|
101 | 103 |
/** |
102 | 104 |
* Pinta de alguna manera especial las geometrias seleccionadas para la |
... | ... | |
681 | 683 |
* DOCUMENT ME! |
682 | 684 |
*/ |
683 | 685 |
public void setGridVisibility(boolean value) { |
684 |
getGrid().setUseGrid(value);
|
|
686 |
getGrid().setShowGrid(value);
|
|
685 | 687 |
getGrid().setViewPort(getMapControl().getViewPort()); |
686 | 688 |
getMapControl().repaint(); |
687 | 689 |
} |
... | ... | |
943 | 945 |
return editionManager; |
944 | 946 |
} |
945 | 947 |
|
948 |
public void initializeFlatness() { |
|
949 |
Preferences prefs = Preferences.userRoot().node( "gvsig.options.view" ); |
|
950 |
double flatness = prefs.getDouble("flatness",FConverter.flatness); |
|
951 |
FConverter.flatness=flatness; |
|
946 | 952 |
|
953 |
|
|
954 |
} |
|
955 |
public void initializeGrid(){ |
|
956 |
boolean showGrid = prefs.getBoolean("grid.showgrid",getGrid().isShowGrid()); |
|
957 |
boolean adjustGrid = prefs.getBoolean("grid.adjustgrid",getGrid().isAdjustGrid()); |
|
958 |
|
|
959 |
double dx = prefs.getDouble("grid.distancex",getGrid().getGridSizeX()); |
|
960 |
double dy = prefs.getDouble("grid.distancey",getGrid().getGridSizeY()); |
|
961 |
|
|
962 |
setGridVisibility(showGrid); |
|
963 |
setAdjustGrid(adjustGrid); |
|
964 |
getGrid().setGridSizeX(dx); |
|
965 |
getGrid().setGridSizeY(dy); |
|
966 |
} |
|
967 |
|
|
947 | 968 |
} |
Also available in: Unified diff