Statistics
| Revision:

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

History | View | Annotate | Download (1.59 KB)

1
/*
2
 * Creado el 3-marzo-2005
3
 */
4
package org.cresques.ui.raster;
5

    
6
import javax.swing.JPanel;
7

    
8
import org.cresques.io.GeoRasterFile;
9
import org.cresques.io.GeoRasterWriter;
10
import org.cresques.ui.DefaultDialogPanel;
11

    
12
/**
13
 * 
14
 * @author Nacho Brodin <brodin_ign@gva.es>
15
 *
16
 * 
17
 */
18
public class SaveRasterPropsDialogPanel extends DefaultDialogPanel {
19
        
20
        private GeoRasterWriter         writer = null;
21
        private String                                 formato = null;
22
        
23
        
24
        public SaveRasterPropsDialogPanel(GeoRasterWriter writer) {
25
                super();
26
                this.writer = writer;
27
                this.formato = writer.getIdent();
28
                if(contentPane!=null)
29
                        //((SavePropsSetupPanel)contentPane).setFormat(formato);
30
                        ((SavePropsSetupPanel)contentPane).setWriter(writer);
31
                initialize(); 
32
        }
33

    
34
        /**
35
         * This method initializes this
36
         * 
37
         * @return void
38
         */
39
        protected void initialize() {
40
                super.initialize();
41
        this.setBounds(0,0,355,230);
42
        }
43
        
44
        protected BandSetupPanel getBandSetupPanel() {
45
                return (BandSetupPanel) getContentPanel();
46
        }
47
        
48
        public JPanel getContentPanel() {
49
                if (contentPane == null) {
50
                        contentPane = new SavePropsSetupPanel();
51
                        contentPane.setBounds(14, 12, 345, 174);
52
                        ((SavePropsSetupPanel)contentPane).setDialogPanel(this);
53
                }
54
                return contentPane;
55
        }
56
        /**
57
         * @param files
58
         */
59
        public void addFiles(GeoRasterFile[] files) {
60
                getBandSetupPanel().addFiles(files);
61
                getBandSetupPanel().repaint();
62
                this.repaint();
63
        }
64
        /**
65
         * @param nBand
66
         * @param flag
67
         */
68
        public void assignBand(int nBand, int flag) {
69
                getBandSetupPanel().assignBand(nBand, flag);
70
        }
71
        
72
        public int getAssignedBand(int flag) {
73
                return getBandSetupPanel().getAssignedBand(flag);
74
        }
75
}
76