Revision 1306 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/MaskThresholdPanelImpl.java

View differences:

MaskThresholdPanelImpl.java
28 28
import javax.swing.JComponent;
29 29
import javax.swing.JPanel;
30 30

  
31
import org.gvsig.raster.swing.listener.PanelChangeListener;
31 32
import org.gvsig.raster.tools.algorithm.swing.impl.bean.inputlayer.InputLayerImpl;
32 33
import org.gvsig.raster.tools.algorithm.swing.maskthreshold.MaskThresholdData;
33 34
import org.gvsig.raster.tools.algorithm.swing.maskthreshold.MaskThresholdPanel;
......
40 41
	private InputLayerImpl                  inputLayerPanel      = null;
41 42
	private OperationMaskThresholdImpl      operationPanel       = null;
42 43
	private OutputMaskThresholdImpl         outputPanel          = null;
44
	private MaskThresholdDataImpl           data                 = null;
43 45
	
44 46
	public MaskThresholdPanelImpl() {
45 47
		init();
......
91 93
	public InputLayerImpl getLayerSelection() {
92 94
		if(inputLayerPanel == null) {
93 95
			inputLayerPanel = new InputLayerImpl(null, true, true);
94
			inputLayerPanel.setEnabled(false);
96
			inputLayerPanel.setEnabled(true);
95 97
		}
96 98
		return inputLayerPanel;
97 99
	}
98 100

  
99 101
	public MaskThresholdData getOutput() {
100
		return null;
102
		if(data == null)
103
			data = new MaskThresholdDataImpl(this);
104
		return data;
101 105
	}
102 106

  
103 107
	public JComboBox getComboBox(int component) {
......
115 119
			return getOutputMaskThresholdPanel().getLayerSelection().getInputLayerCombo();
116 120
		if(component == METHOD_OUTPUT_COMBO)
117 121
			return getOutputMaskThresholdPanel().getMethodOutput().getCombo();
122
		if(component == OPERATION_OUTPUT_COMBO)
123
			return getOperationMaskThresholdPanel().getComboText().getCombo();
118 124
		return null;
119 125
	}
120 126

  
121
	
127
	public void addPanelChangeEvent(PanelChangeListener listener) {
128
		getLayerSelection().addPanelChangeEvent(listener);
129
		getOperationMaskThresholdPanel().addPanelChangeEvent(listener);
130
		getOutputMaskThresholdPanel().addPanelChangeEvent(listener);
131
	}
122 132
}

Also available in: Unified diff