Revision 22364 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/properties/panels/NoDataPanel.java
NoDataPanel.java | ||
---|---|---|
25 | 25 |
import java.awt.event.ActionListener; |
26 | 26 |
import java.awt.event.ItemEvent; |
27 | 27 |
import java.awt.event.ItemListener; |
28 |
import java.io.FileNotFoundException; |
|
28 | 29 |
import java.io.IOException; |
29 | 30 |
import java.text.NumberFormat; |
30 | 31 |
|
... | ... | |
39 | 40 |
|
40 | 41 |
import org.gvsig.fmap.raster.layers.FLyrRasterSE; |
41 | 42 |
import org.gvsig.raster.ConfigurationEvent; |
42 |
import org.gvsig.raster.dataset.RasterDataset;
|
|
43 |
import org.gvsig.raster.datastruct.NoData;
|
|
43 |
import org.gvsig.raster.dataset.io.rmf.RmfBlocksManager;
|
|
44 |
import org.gvsig.raster.datastruct.serializer.NoDataRmfSerializer;
|
|
44 | 45 |
import org.gvsig.raster.hierarchy.IRasterProperties; |
45 |
import org.gvsig.raster.util.PanelBase;
|
|
46 |
import org.gvsig.raster.util.BasePanel;
|
|
46 | 47 |
/** |
47 | 48 |
* Panel para la gestion del valor NoData en el panel de propiedades |
48 | 49 |
* |
49 | 50 |
* @version 18/12/2007 |
50 | 51 |
* @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es) |
51 | 52 |
*/ |
52 |
public class NoDataPanel extends PanelBase implements ItemListener, ActionListener {
|
|
53 |
private static final long serialVersionUID = 7645641060812458944L; |
|
53 |
public class NoDataPanel extends BasePanel implements ItemListener, ActionListener {
|
|
54 |
private static final long serialVersionUID = 7645641060812458944L;
|
|
54 | 55 |
|
55 | 56 |
private JLabel jLabelValue = null; |
56 | 57 |
private JComboBox jComboBoxSetup = null; |
... | ... | |
60 | 61 |
private IRasterProperties layer = null; |
61 | 62 |
|
62 | 63 |
public NoDataPanel(INoDataPanel noDataPanel) { |
63 |
initialize(); |
|
64 |
translate(); |
|
65 | 64 |
this.noDataPanel = noDataPanel; |
66 | 65 |
setEnabledComponents(false); |
66 |
init(); |
|
67 |
translate(); |
|
67 | 68 |
} |
68 | 69 |
|
69 | 70 |
private JComboBox getComboBoxSetup() { |
... | ... | |
74 | 75 |
return jComboBoxSetup; |
75 | 76 |
} |
76 | 77 |
|
77 |
private void translate() {
|
|
78 |
protected void translate() {
|
|
78 | 79 |
getButtonSaveDefault().setText(getText(this, "guardar_predeterminado")); |
79 | 80 |
getComboBoxSetup().setModel(new DefaultComboBoxModel(new String[] { getText(this, "desactivado"), getText(this, "capa"), getText(this, "personalizado") })); |
80 | 81 |
getLabelValue().setText(getText(this, "value") + ":"); |
... | ... | |
109 | 110 |
return jLabelValue; |
110 | 111 |
} |
111 | 112 |
|
112 |
private void initialize() {
|
|
113 |
protected void init() {
|
|
113 | 114 |
GridBagConstraints gridBagConstraints; |
114 | 115 |
|
115 |
getPanel().setLayout(new GridBagLayout());
|
|
116 |
setLayout(new GridBagLayout()); |
|
116 | 117 |
|
117 | 118 |
int col = 0; |
118 | 119 |
gridBagConstraints = new GridBagConstraints(); |
... | ... | |
121 | 122 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL; |
122 | 123 |
gridBagConstraints.weightx = 1.0; |
123 | 124 |
gridBagConstraints.insets = new Insets(5, 5, 5, 2); |
124 |
getPanel().add(getComboBoxSetup(), gridBagConstraints);
|
|
125 |
add(getComboBoxSetup(), gridBagConstraints); |
|
125 | 126 |
|
126 | 127 |
col++; |
127 | 128 |
gridBagConstraints = new GridBagConstraints(); |
128 | 129 |
gridBagConstraints.gridx = col; |
129 | 130 |
gridBagConstraints.gridy = 0; |
130 | 131 |
gridBagConstraints.insets = new Insets(5, 2, 5, 2); |
131 |
getPanel().add(getLabelValue(), gridBagConstraints);
|
|
132 |
add(getLabelValue(), gridBagConstraints); |
|
132 | 133 |
|
133 | 134 |
col++; |
134 | 135 |
gridBagConstraints = new GridBagConstraints(); |
... | ... | |
137 | 138 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL; |
138 | 139 |
gridBagConstraints.weightx = 1.0; |
139 | 140 |
gridBagConstraints.insets = new Insets(5, 2, 5, 2); |
140 |
getPanel().add(getTextFieldValue(), gridBagConstraints);
|
|
141 |
add(getTextFieldValue(), gridBagConstraints); |
|
141 | 142 |
|
142 | 143 |
col++; |
143 | 144 |
gridBagConstraints = new GridBagConstraints(); |
144 | 145 |
gridBagConstraints.gridx = col; |
145 | 146 |
gridBagConstraints.gridy = 0; |
146 | 147 |
gridBagConstraints.insets = new Insets(5, 2, 5, 5); |
147 |
getPanel().add(getButtonSaveDefault(), gridBagConstraints);
|
|
148 |
add(getButtonSaveDefault(), gridBagConstraints); |
|
148 | 149 |
} |
149 | 150 |
|
150 | 151 |
/* |
Also available in: Unified diff