Statistics
| Revision:

svn-document-layout / trunk / org.gvsig.app.document.layout2.app / org.gvsig.app.document.layout2.app.mainplugin / src / main / java / org / gvsig / app / project / documents / layout / fframes / IFFrameUseFMap.java @ 219

History | View | Annotate | Download (4.94 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.app.project.documents.layout.fframes;
23

    
24
import java.awt.geom.AffineTransform;
25
import java.awt.geom.Point2D;
26
import java.awt.image.BufferedImage;
27

    
28
import org.gvsig.fmap.dal.exception.ReadException;
29
import org.gvsig.fmap.geom.primitive.Envelope;
30
import org.gvsig.fmap.mapcontext.MapContext;
31

    
32
/**
33
 * FFrame which uses a MapContext object, usually because their content is
34
 * dependent on the MapContext properties
35
 */
36
public interface IFFrameUseFMap extends IFFrame {
37
    public AffineTransform getATMap();
38

    
39
    public void setATMap(AffineTransform at);
40

    
41
    /**
42
     * Returns the MapContext contained in this FFrameView, which is
43
     * usually a clone of the associated View. This MapContext
44
     * may be synchronized with the View one, depending on the
45
     * scale type that has been set (see {{@link #getTypeScale()}.
46
     * 
47
     * @return The mapContext object
48
     */
49
    public MapContext getMapContext();
50

    
51
    public void refresh();
52

    
53
    /**
54
     * Sets a new Envelope on the MapContext contained in
55
     * this FFrameView
56
     * 
57
     * @param r Envelope to be set
58
     */
59
    public void setNewEnvelope(Envelope r);
60

    
61
    /**
62
     * Gets a buffered image containing a cached version of the
63
     * painted result of this FFrame. The size of the buffered image
64
     * will match only the visible area of the component, not the full
65
     * size of it. 
66
     * 
67
     * @return The cached image or null if the image is not available
68
     */
69
    public BufferedImage getBufferedImage();
70

    
71
    /**
72
     * Zooms to the extent containing all the layers loaded in the map. 
73
     * 
74
     * @throws ReadException
75
     */
76
    public void fullExtent() throws ReadException;
77

    
78
    public void setPointsToZoom(Point2D px1, Point2D px2);
79

    
80
    public void movePoints(Point2D px1, Point2D px2);
81

    
82
    public void refreshOriginalExtent();    
83
    
84
    /**
85
     * Gets the synchronization mode for layers. If <code>true</code>, layers
86
     * will be synchronized between the FFrameView and the associated View, so
87
     * any change in the FFrameView (layer added or removed, visibility changed,
88
     * symbology change, etc) will be propagated to the associated View, and
89
     * vice versa.
90
     * 
91
     * @return <code>true</code> if the layers are synchronized between the 
92
     * FFrameView and the View, <code>false</code> otherwise.
93
     */
94
    public boolean getLayerSynced();
95

    
96
    /**
97
     * Sets the synchronization mode for map layers. If <code>true</code>,
98
     * layers will be synchronized between the FFrameView and the associated
99
     * View, so any change in the FFrameView (layer added or removed,
100
     * visibility changed, symbology change, etc) will be propagated to the
101
     * associated View, and vice versa.
102
     * 
103
     * @param synced <code>true</code> to enable layers synchronization
104
     * between the FFrameView and the View, <code>false</code> otherwise.
105
     */
106
    public void setLayerSynced(boolean synced);
107

    
108
    /**
109
     * Gets the synchronization mode for the map extent. If <code>true</code>,
110
     * the map extent will be synchronized between the FFrameView and the
111
     * associated View, so any change in the FFrameView (pan, zoom in, zoom
112
     * out...) will be propagated to the associated View, and vice versa.
113
     * 
114
     * @return <code>true</code> if the map extent is synchronized between the 
115
     * FFrameView and the View, <code>false</code> otherwise.
116
     */
117
    public boolean getExtentSynced();
118
    
119
    /**
120
     * Sets the synchronization mode for the map extent. If <code>true</code>,
121
     * the map extent will be synchronized between the FFrameView and the
122
     * associated View, so any change in the FFrameView (pan, zoom in, zoom
123
     * out...) will be propagated to the associated View, and vice versa.
124
     * 
125
     * @param synced <code>true</code> to enable extent synchronization
126
     * between the FFrameView and the View, <code>false</code> otherwise.
127
     */
128
    public void setExtentSynced(boolean synced);
129
    
130
    /**
131
     * Sets the scale of the MapContext contained in this FFrameView
132
     * 
133
     * @param d Scale to be set
134
     */
135
    public void setScale(double d);
136
}