svn-gvsig-desktop / branches / CqCMSDvp / libraries / libCq CMS for java.old / src / org / cresques / ui / raster / SaveRasterPropsDialogPanel.java @ 1746
History | View | Annotate | Download (1.7 KB)
1 | 1736 | igbrotru | /*
|
---|---|---|---|
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 | 1738 | igbrotru | //super.initialize();
|
41 | 1736 | igbrotru | this.setBounds(0,0,355,230); |
42 | 1746 | igbrotru | |
43 | //Ocultamos el bot?n de aplicar
|
||
44 | |||
45 | this.getApplyButton().setVisible(false); |
||
46 | 1736 | igbrotru | } |
47 | |||
48 | protected BandSetupPanel getBandSetupPanel() {
|
||
49 | return (BandSetupPanel) getContentPanel();
|
||
50 | } |
||
51 | |||
52 | public JPanel getContentPanel() { |
||
53 | if (contentPane == null) { |
||
54 | contentPane = new SavePropsSetupPanel();
|
||
55 | contentPane.setBounds(14, 12, 345, 174); |
||
56 | ((SavePropsSetupPanel)contentPane).setDialogPanel(this);
|
||
57 | } |
||
58 | return contentPane;
|
||
59 | } |
||
60 | /**
|
||
61 | * @param files
|
||
62 | */
|
||
63 | public void addFiles(GeoRasterFile[] files) { |
||
64 | getBandSetupPanel().addFiles(files); |
||
65 | getBandSetupPanel().repaint(); |
||
66 | this.repaint();
|
||
67 | } |
||
68 | /**
|
||
69 | * @param nBand
|
||
70 | * @param flag
|
||
71 | */
|
||
72 | public void assignBand(int nBand, int flag) { |
||
73 | getBandSetupPanel().assignBand(nBand, flag); |
||
74 | } |
||
75 | |||
76 | public int getAssignedBand(int flag) { |
||
77 | return getBandSetupPanel().getAssignedBand(flag);
|
||
78 | } |
||
79 | } |