gvsig-raster / org.gvsig.raster.tools / trunk / org.gvsig.raster.tools / org.gvsig.raster.tools.algorithm / org.gvsig.raster.tools.algorithm.swing / org.gvsig.raster.tools.algorithm.swing.impl / src / main / java / org / gvsig / raster / tools / algorithm / swing / impl / maskthreshold / OutputMaskThresholdImpl.java @ 1284
History | View | Annotate | Download (3.33 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
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., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.raster.tools.algorithm.swing.impl.maskthreshold; |
23 |
|
24 |
import java.awt.GridBagConstraints; |
25 |
import java.awt.GridBagLayout; |
26 |
|
27 |
import javax.swing.BorderFactory; |
28 |
import javax.swing.JPanel; |
29 |
|
30 |
import org.gvsig.i18n.Messages; |
31 |
import org.gvsig.raster.tools.algorithm.swing.impl.bean.combotext.ComboTextImpl; |
32 |
import org.gvsig.raster.tools.algorithm.swing.impl.bean.inputlayer.InputLayerImpl; |
33 |
|
34 |
/**
|
35 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
36 |
*/
|
37 |
public class OutputMaskThresholdImpl extends JPanel { |
38 |
private static final long serialVersionUID = 1L; |
39 |
private ComboTextImpl satisfyCombo = null; |
40 |
private ComboTextImpl notSatisfyCombo = null; |
41 |
private InputLayerImpl layerSelection = null; |
42 |
|
43 |
public OutputMaskThresholdImpl() {
|
44 |
init(); |
45 |
} |
46 |
|
47 |
private void init() { |
48 |
this.setLayout(new GridBagLayout()); |
49 |
setBorder(BorderFactory.createTitledBorder(Messages.getText("output"))); |
50 |
GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); |
51 |
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; |
52 |
gridBagConstraints1.weightx = 1;
|
53 |
gridBagConstraints1.insets = new java.awt.Insets(0, 0, 4, 0); |
54 |
|
55 |
gridBagConstraints1.gridx = 0;
|
56 |
gridBagConstraints1.gridy = 0;
|
57 |
this.add(getLayerSelection(), gridBagConstraints1);
|
58 |
|
59 |
gridBagConstraints1.gridx = 0;
|
60 |
gridBagConstraints1.gridy = 1;
|
61 |
this.add(getSatisfyCombo(), gridBagConstraints1);
|
62 |
|
63 |
gridBagConstraints1.gridx = 0;
|
64 |
gridBagConstraints1.gridy = 2;
|
65 |
this.add(getNotSatisfyCombo(), gridBagConstraints1);
|
66 |
|
67 |
gridBagConstraints1.fill = java.awt.GridBagConstraints.BOTH; |
68 |
gridBagConstraints1.weightx = 1;
|
69 |
gridBagConstraints1.weighty = 1;
|
70 |
gridBagConstraints1.gridx = 0;
|
71 |
gridBagConstraints1.gridy = 3;
|
72 |
this.add(new JPanel(), gridBagConstraints1); |
73 |
} |
74 |
|
75 |
public ComboTextImpl getSatisfyCombo() {
|
76 |
if(satisfyCombo == null){ |
77 |
satisfyCombo = new ComboTextImpl(
|
78 |
new String[]{Messages.getText("satisfy"), ""}, false, true); |
79 |
satisfyCombo.getTextField().setEnabled(false);
|
80 |
} |
81 |
return satisfyCombo;
|
82 |
} |
83 |
|
84 |
public ComboTextImpl getNotSatisfyCombo() {
|
85 |
if(notSatisfyCombo == null) { |
86 |
notSatisfyCombo = new ComboTextImpl(
|
87 |
new String[]{Messages.getText("not_satisfy"), ""}, false, true); |
88 |
notSatisfyCombo.getTextField().setEnabled(false);
|
89 |
} |
90 |
return notSatisfyCombo;
|
91 |
} |
92 |
|
93 |
public InputLayerImpl getLayerSelection() {
|
94 |
if(layerSelection == null) { |
95 |
layerSelection = new InputLayerImpl(null, false, true); |
96 |
layerSelection.setEnabled(false);
|
97 |
} |
98 |
return layerSelection;
|
99 |
} |
100 |
|
101 |
} |