Revision 4181 org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/clip/ui/panel/ClippingSelectionPanel.java
ClippingSelectionPanel.java | ||
---|---|---|
2 | 2 |
* |
3 | 3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
4 | 4 |
* of the Valencian Government (CIT) |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* This program is free software; you can redistribute it and/or |
7 | 7 |
* modify it under the terms of the GNU General Public License |
8 | 8 |
* as published by the Free Software Foundation; either version 2 |
9 | 9 |
* of the License, or (at your option) any later version. |
10 |
*
|
|
10 |
* |
|
11 | 11 |
* This program is distributed in the hope that it will be useful, |
12 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | 14 |
* GNU General Public License for more details. |
15 |
*
|
|
15 |
* |
|
16 | 16 |
* You should have received a copy of the GNU General Public License |
17 | 17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 | 19 |
* MA 02110-1301, USA. |
20 |
*
|
|
20 |
* |
|
21 | 21 |
*/ |
22 | 22 |
package org.gvsig.raster.tools.app.basic.tool.clip.ui.panel; |
23 | 23 |
|
... | ... | |
38 | 38 |
/** |
39 | 39 |
* Panel de seleccion de que bandas. Permite seleccionar que bandas se van a |
40 | 40 |
* guardar y especificar su orden. |
41 |
*
|
|
41 |
* |
|
42 | 42 |
* @version 25/09/2007 |
43 | 43 |
* @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es) |
44 | 44 |
*/ |
... | ... | |
52 | 52 |
public ClippingSelectionPanel() { |
53 | 53 |
initialize(); |
54 | 54 |
} |
55 |
|
|
56 | 55 |
|
56 |
|
|
57 | 57 |
private void initialize() { |
58 | 58 |
setLayout(new BorderLayout()); |
59 | 59 |
add(getTableContainer(), BorderLayout.CENTER); |
60 | 60 |
} |
61 |
|
|
61 |
|
|
62 | 62 |
/** |
63 | 63 |
* Obtiene la tabla de selecci?n de bandas |
64 | 64 |
* @return Tabla de selecci?n de bandas |
... | ... | |
72 | 72 |
tableContainer.initialize(); |
73 | 73 |
tableContainer.setControlVisible(false); |
74 | 74 |
tableContainer.setMoveRowsButtonsVisible(true); |
75 |
|
|
75 |
|
|
76 | 76 |
tableContainer.getTable().getJTable().getColumnModel().getColumn(2).setMinWidth(0); |
77 | 77 |
tableContainer.getTable().getJTable().getColumnModel().getColumn(2).setMaxWidth(0); |
78 | 78 |
tableContainer.getTable().getJTable().getColumnModel().getColumn(0).setMinWidth(55); |
79 | 79 |
tableContainer.getTable().getJTable().getColumnModel().getColumn(0).setMaxWidth(55); |
80 |
|
|
80 |
|
|
81 | 81 |
} |
82 | 82 |
|
83 | 83 |
return tableContainer; |
84 | 84 |
} |
85 |
|
|
85 |
|
|
86 | 86 |
/** |
87 | 87 |
* Establecer la capa para usarla en el recorte |
88 | 88 |
* @param fLayer |
... | ... | |
94 | 94 |
|
95 | 95 |
RasterDataParameters[] params = dataStore.getDataParametersByProvider(); |
96 | 96 |
int[] nBands = dataStore.getBandCountByProvider(); |
97 |
|
|
97 |
|
|
98 | 98 |
for (int i = 0; i < params.length; i++) { |
99 | 99 |
String fName = null; |
100 | 100 |
if(params[i] instanceof RasterDataParameters) |
101 |
fName = ((RasterDataParameters)params[i]).getURI(); |
|
101 |
fName = ((RasterDataParameters)params[i]).getURI().getPath();
|
|
102 | 102 |
if(params[i] == null && params[i] instanceof TileDataParameters && ((TileDataParameters)params[i]).getName() != null) |
103 | 103 |
fName = ((TileDataParameters)params[i]).getName(); |
104 | 104 |
cont = loadBandsTable(nBands[i], fName, cont); |
105 | 105 |
} |
106 | 106 |
} |
107 |
|
|
107 |
|
|
108 | 108 |
/** |
109 | 109 |
* Loads the band table |
110 | 110 |
* @param dataStore |
... | ... | |
132 | 132 |
RasterSwingLibrary.messageBoxError("error_rowtable", this, e); |
133 | 133 |
} |
134 | 134 |
} |
135 |
|
|
135 |
|
|
136 | 136 |
return cont; |
137 | 137 |
} |
138 | 138 |
} |
Also available in: Unified diff