Revision 1757 trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/DefaultLayoutControl.java
DefaultLayoutControl.java | ||
---|---|---|
75 | 75 |
import org.gvsig.app.project.documents.layout.tools.behavior.LayoutZoomBehavior; |
76 | 76 |
import org.gvsig.app.project.documents.layout.tools.listener.ILayoutGraphicListener; |
77 | 77 |
import org.gvsig.fmap.dal.exception.ReadException; |
78 |
import org.gvsig.layout.mapbox.MapBoxUtils; |
|
79 | 78 |
import org.gvsig.tools.observer.Observable; |
79 |
import org.slf4j.Logger; |
|
80 |
import org.slf4j.LoggerFactory; |
|
80 | 81 |
|
81 | 82 |
/** |
82 | 83 |
* Control of Layout. |
... | ... | |
84 | 85 |
* @author Vicente Caballero Navarro |
85 | 86 |
*/ |
86 | 87 |
public class DefaultLayoutControl extends JComponent implements LayoutControl { |
88 |
|
|
89 |
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultLayoutControl.class); |
|
90 |
|
|
87 | 91 |
private static final int DESACTUALIZADO = 4; |
88 | 92 |
private static final int ACTUALIZADO = 5; |
89 | 93 |
|
... | ... | |
235 | 239 |
new LayoutEditGraphicsListenerImpl(layoutPanel); |
236 | 240 |
addLayoutTool("layoutedit", new LayoutEditBehavior(leditl)); |
237 | 241 |
|
238 |
MapBoxUtils.addLayoutTool(layoutPanel, this); |
|
239 | 242 |
} |
240 | 243 |
|
241 | 244 |
@Override |
... | ... | |
250 | 253 |
} |
251 | 254 |
|
252 | 255 |
@Override |
256 |
public LayoutBehavior getLayoutTool(String name) { |
|
257 |
return (LayoutBehavior) namesLayoutTools.get(name); |
|
258 |
} |
|
259 |
|
|
260 |
@Override |
|
253 | 261 |
public void setLayoutContext(LayoutContext lc) { |
254 | 262 |
layoutContext = lc; |
255 | 263 |
layoutContext.addObserver(this); |
... | ... | |
269 | 277 |
Rectangle rClip = g.getClipBounds(); |
270 | 278 |
|
271 | 279 |
if (rClip == null) { |
272 |
System.err.println("clip = null");
|
|
280 |
LOGGER.debug("clip = null");
|
|
273 | 281 |
} |
274 | 282 |
|
275 | 283 |
switch (status) { |
... | ... | |
289 | 297 |
Graphics gimgRuler = imgRuler.getGraphics(); |
290 | 298 |
clipVisibleRect((Graphics2D) gimag); |
291 | 299 |
|
292 |
try { |
|
293 |
layoutDraw.drawLayout((Graphics2D) gimag, img); |
|
294 |
} catch (ReadException e) { |
|
295 |
e.printStackTrace(); |
|
296 |
} |
|
300 |
layoutDraw.drawLayout((Graphics2D) gimag, img); |
|
297 | 301 |
|
298 | 302 |
g.setClip(rClip); |
299 | 303 |
layoutDraw.drawRectangle((Graphics2D) g); |
Also available in: Unified diff