Revision 1744 trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/fframes/FFrameSymbol.java
FFrameSymbol.java | ||
---|---|---|
32 | 32 |
import org.gvsig.fmap.geom.Geometry; |
33 | 33 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
34 | 34 |
import org.gvsig.fmap.mapcontext.MapContextManager; |
35 |
import org.gvsig.fmap.mapcontext.ViewPort; |
|
35 | 36 |
import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport; |
36 | 37 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
37 | 38 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException; |
... | ... | |
49 | 50 |
public class FFrameSymbol extends FFrameGraphics { |
50 | 51 |
|
51 | 52 |
public static final String PERSISTENCE_DEFINITION_NAME = "FFrameSymbol"; |
53 |
private static final String VIEWPORT_FIELD = "viewport"; |
|
52 | 54 |
|
53 | 55 |
private PrintAttributes properties; |
56 |
private ViewPort viewPort; |
|
54 | 57 |
|
55 | 58 |
private final MapContextManager mapContextManager = MapContextLocator |
56 | 59 |
.getMapContextManager(); |
... | ... | |
94 | 97 |
try { |
95 | 98 |
ISymbol sym = getFSymbol(); |
96 | 99 |
if(sym instanceof CartographicSupport){ |
97 |
((CartographicSupport)sym).setCartographicContext(properties);
|
|
100 |
((CartographicSupport)sym).setCartographicContext(viewPort, properties, null);
|
|
98 | 101 |
} |
99 | 102 |
|
100 | 103 |
sym.drawInsideRectangle(g, mT2, rec); //, properties); |
... | ... | |
181 | 184 |
public void loadFromState(PersistentState state) |
182 | 185 |
throws PersistenceException { |
183 | 186 |
super.loadFromState(state); |
187 |
this.viewPort = (ViewPort) state.get(VIEWPORT_FIELD); |
|
184 | 188 |
} |
185 | 189 |
|
186 | 190 |
@Override |
187 | 191 |
public void saveToState(PersistentState state) throws PersistenceException { |
188 | 192 |
super.saveToState(state); |
193 |
state.set(VIEWPORT_FIELD, this.viewPort); |
|
189 | 194 |
} |
190 | 195 |
|
196 |
public void setViewPort(ViewPort viewPort) { |
|
197 |
this.viewPort = viewPort; |
|
198 |
} |
|
199 |
|
|
191 | 200 |
} |
Also available in: Unified diff