Statistics
| Revision:

svn-gvsig-desktop / branches / CqCMSDvp / libraries / libCq CMS for java.old / src / org / cresques / ui / raster / RasterPropsDialogPanel.java @ 2312

History | View | Annotate | Download (2.29 KB)

1
/*
2
 * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
3
 * 
4
 * Copyright (C) 2004-5. 
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 * For more information, contact:
21
 * 
22
 * cresques@gmail.com
23
 */
24
package org.cresques.ui.raster;
25

    
26
import javax.swing.JPanel;
27

    
28
import org.cresques.io.GeoRasterFile;
29
import org.cresques.ui.DefaultDialogPanel;
30

    
31
/**
32
 * Dialogo para configurar las propiedades del raster.
33
 * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
34
 */
35
public class RasterPropsDialogPanel extends DefaultDialogPanel {
36
        
37
        /**
38
         * Constructor
39
         */
40
        public RasterPropsDialogPanel() {
41
                super();
42
                initialize();
43
        }
44

    
45
        /**
46
         * This method initializes this
47
         * 
48
         * @return void
49
         */
50
        private void initialize() {
51
        this.setBounds(0,0,355,230);
52
        }
53
        
54
        /**
55
         * Obtiene el panel BandSetupPanel con los controles
56
         * @return BandSetupPanel
57
         */
58
        protected BandSetupPanel getBandSetupPanel() {
59
                return (BandSetupPanel) getContentPanel();
60
        }
61
        
62
        /**
63
         * Obtiene el contentPane
64
         */
65
        protected JPanel getContentPanel() {
66
                if (contentPane == null) {
67
                        contentPane = new BandSetupPanel();
68
                        contentPane.setBounds(14, 12, 345, 174);
69
                }
70
                return contentPane;
71
        }
72
        
73
        /**
74
         * A?ade una lista de GeoRasterFile al panel de bandas 
75
         * @param files Array de GeoRasterFile
76
         */
77
        public void addFiles(GeoRasterFile[] files) {
78
                getBandSetupPanel().addFiles(files);
79
                getBandSetupPanel().repaint();
80
                this.repaint();
81
        }
82
        
83
        /**
84
         * @param nBand        
85
         * @param flag 
86
         */
87
        public void assignBand(int nBand, int flag) {
88
                getBandSetupPanel().assignBand(nBand, flag);
89
        }
90
        
91
        public int getAssignedBand(int flag) {
92
                return getBandSetupPanel().getAssignedBand(flag);
93
        }
94
}
95