Statistics
| Revision:

svn-gvsig-desktop / trunk / prototypes / mobile / desktop / extensions / extExportMobile / src / es / prodevelop / gvsig / exportMobile / ui / panels / ArrayExtents.java @ 19124

History | View | Annotate | Download (1.12 KB)

1
package es.prodevelop.gvsig.exportMobile.ui.panels;
2

    
3
import java.awt.geom.Rectangle2D;
4
import com.iver.andami.PluginServices;
5
import com.iver.cit.gvsig.project.ProjectExtent;
6
import com.iver.cit.gvsig.project.documents.view.gui.View;
7

    
8
/**
9
 * Add to a list the view`s extents,and return the selected extents
10
 * @author Anabel Moreno
11
 *
12
 */
13
public class ArrayExtents {
14

    
15
        private ProjectExtent[] listExtent;
16

    
17
        private ProjectExtent extentSelected;
18

    
19
        /**
20
         * Get extents of the view
21
         */
22
        public ArrayExtents() {
23

    
24
                View view = (View) PluginServices.getMDIManager().getActiveWindow();
25
                listExtent = view.getModel().getProject().getExtents();
26
        }
27

    
28
        /**
29
         * @return list extents
30
         */
31
        public ProjectExtent[] getlistExt() {
32
                return listExtent;
33
        }
34

    
35
        /**
36
         * Set extent selected in list extents
37
         * 
38
         * @param selecOpt
39
         */
40
        public void setExtSelected(int selecOpt) {
41

    
42
                extentSelected = listExtent[selecOpt];
43
        }
44

    
45
        /**
46
         * Get Extents rectangle
47
         * 
48
         * @return
49
         */
50
        public Rectangle2D getRectExtents() {
51

    
52
                Rectangle2D rectExtent = extentSelected.getExtent().getBounds2D();
53
                return rectExtent;
54
        }
55
}