Revision 41811 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/MapControl.java
MapControl.java | ||
---|---|---|
594 | 594 |
* </p> |
595 | 595 |
*/ |
596 | 596 |
public MapControl() { |
597 |
this(new MapContext(new ViewPort(MapContextLocator.getMapContextManager().getDefaultCRS()))); |
|
598 |
} |
|
599 |
|
|
600 |
public MapControl(MapContext theMapContext) { |
|
597 | 601 |
this.setName("MapControl"); |
598 | 602 |
Toolkit toolkit = Toolkit.getDefaultToolkit(); |
599 | 603 |
Image imageTransparentCursor = toolkit.createImage(new MemoryImageSource(16, 16, new int[16 * 16], 0,16)); |
... | ... | |
607 | 611 |
// Clase usada para cancelar el dibujado |
608 | 612 |
canceldraw = new CancelDraw(); |
609 | 613 |
|
610 |
/* |
|
611 |
* We are not accessing the user preferences here. |
|
612 |
* This is an early initialization and is supposed |
|
613 |
* to be reset afterwards from a higher level (plugin) |
|
614 |
*/ |
|
615 |
MapContextManager mcm = MapContextLocator.getMapContextManager(); |
|
616 |
vp = new ViewPort(mcm.getDefaultCRS()); |
|
614 |
vp = theMapContext.getViewPort(); |
|
617 | 615 |
|
618 |
setMapContext(new MapContext(vp));
|
|
616 |
setMapContext(theMapContext);
|
|
619 | 617 |
|
620 | 618 |
// eventos |
621 | 619 |
this.addComponentListener(this); |
Also available in: Unified diff