Revision 1306

View differences:

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.api/src/main/java/org/gvsig/raster/tools/algorithm/swing/bean/LayerComboElement.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2011-2012 Prodevelop S.L
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
 * MA  02110-1301, USA.
19
 *
20
 */
21
package org.gvsig.raster.tools.algorithm.swing.bean;
22

  
23
/**
24
 * Nacho Brodin (nachobrodin@gmail.com)
25
 */
26
public interface LayerComboElement {
27
	public String toString();
28
	
29
	public int getNumOfElements();
30
}
0 31

  
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.api/src/main/java/org/gvsig/raster/tools/algorithm/swing/maskthreshold/MaskThresholdData.java
31 31
	
32 32
	public int getBandInputLayer();
33 33
	
34
	
35 34
	public int getOperation();
36 35
	
37 36
	public int getOperationMethod();
38 37
	
39
	public double getValue();
38
	public double getThresholdValue();
40 39
	
41 40
	public Object getOperationLayer();
42 41
	
43 42
	public int getBandOperationLayer();
44 43
	
45
	
46 44
	public Object getOutputInputLayer();
47 45
	
48 46
	public int getBandOutputLayer();
49 47
	
50
    public int getSatisfyMethod();
48
    public int getMethodOutput();
51 49
	
52
	public int getNotSatisfyMethod();
53
	
54
	public double getSatisfyValue();
55
	
56
	public double getNotSatisfyValue();
57
	
58
	
50
	public double getFixedValue();
59 51
}
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.api/src/main/java/org/gvsig/raster/tools/algorithm/swing/maskthreshold/MaskThresholdPanel.java
24 24
import javax.swing.JComboBox;
25 25
import javax.swing.JComponent;
26 26

  
27
import org.gvsig.raster.swing.listener.PanelChangeListener;
28

  
27 29
/**
28 30
 * API for the mask threshold user interface
29 31
 * @author Nacho Brodin (nachobrodin@gmail.com)
30 32
 */
31 33
public interface MaskThresholdPanel {
32
	public static final int           LAYERS_INPUT_COMBO    = 0;
33
	public static final int           BANDS_INPUT_COMBO     = 1;
34
	public static final int           LAYERS_OPERAT_COMBO   = 2;
35
	public static final int           BANDS_OPERAT_COMBO    = 3;
36
	public static final int           LAYERS_OUTPUT_COMBO   = 4;
37
	public static final int           BANDS_OUTPUT_COMBO    = 5;
38
	public static final int           METHOD_OUTPUT_COMBO   = 6;
34
	public static final int           LAYERS_INPUT_COMBO       = 0;
35
	public static final int           BANDS_INPUT_COMBO        = 1;
36
	public static final int           LAYERS_OPERAT_COMBO      = 2;
37
	public static final int           BANDS_OPERAT_COMBO       = 3;
38
	public static final int           LAYERS_OUTPUT_COMBO      = 4;
39
	public static final int           BANDS_OUTPUT_COMBO       = 5;
40
	public static final int           METHOD_OUTPUT_COMBO      = 6;
41
	public static final int           OPERATION_OUTPUT_COMBO   = 7;
39 42
	
40 43
	public MaskThresholdData getOutput();
41 44
	
42 45
	public JComboBox getComboBox(int component);
43 46
	
44 47
	public JComponent getComponent();
48
	
49
	/**
50
	 * Events when any component receives changes
51
	 * @param listener
52
	 */
53
	public void addPanelChangeEvent(PanelChangeListener listener);
45 54
}
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/bean/combotext/ComboTextImpl.java
24 24
import java.awt.Dimension;
25 25
import java.awt.GridBagConstraints;
26 26
import java.awt.GridBagLayout;
27
import java.awt.event.ActionEvent;
28
import java.awt.event.ActionListener;
27 29

  
28 30
import javax.swing.BorderFactory;
29 31
import javax.swing.JComboBox;
30 32
import javax.swing.JLabel;
31 33
import javax.swing.JPanel;
32 34
import javax.swing.JTextField;
35
import javax.swing.event.DocumentEvent;
36
import javax.swing.event.DocumentListener;
33 37

  
38
import org.gvsig.raster.swing.listener.PanelChangeEvent;
39
import org.gvsig.raster.swing.listener.PanelChangeListener;
40

  
34 41
/**
35 42
 * @author Nacho Brodin (nachobrodin@gmail.com)
36 43
 */
37
public class ComboTextImpl extends JPanel {
44
public class ComboTextImpl extends JPanel implements ActionListener, DocumentListener {
38 45
	private static final long   serialVersionUID    = 1L;
39 46
	private JComboBox           combo               = null;
40 47
	private JTextField          jtext               = null;
......
42 49
	private String              boxLabel            = null;
43 50
	private boolean             borderEnabled       = false;
44 51
	private boolean             labelsEnabled       = false;
52
	private PanelChangeListener listener            = null;
45 53
	
46 54
	public ComboTextImpl(String[] labels, boolean border, boolean labelEnabled) {
47 55
		if(labels != null) {
......
84 92
	}
85 93
	
86 94
	public JComboBox getCombo() {
87
		if(combo == null)
95
		if(combo == null) {
88 96
			combo = new JComboBox();
97
			combo.addActionListener(this);
98
		}
89 99
		return combo;
90 100
	}
91 101

  
92 102
	public JTextField getTextField() {
93 103
		if(jtext == null) {
94 104
			jtext = new JTextField();
95
			jtext.setPreferredSize(new Dimension(60, 25));
105
			jtext.getDocument().addDocumentListener(this);
106
			jtext.setEditable(true);
107
			jtext.setPreferredSize(new Dimension(60, 24));
108
			jtext.setSize(new Dimension(60, 24));
109
			jtext.setMinimumSize(new Dimension(60, 24));
110
			jtext.setMaximumSize(new Dimension(60, 24));
96 111
		}
97 112
		return jtext;
98 113
	}
114
	
115
	public void addPanelChangeEvent(PanelChangeListener listener) {
116
		this.listener = listener;
117
	}
99 118

  
100 119
	public void setEnabled(boolean enable) {
101 120
		getTextField().setEnabled(enable);
102 121
		getCombo().setEnabled(enable);
103 122
	}
123

  
124
	public void actionPerformed(ActionEvent e) {
125
		if(listener != null)
126
			listener.panelHasChanged(new PanelChangeEvent(e));
127
	}
128

  
129
	public void changedUpdate(DocumentEvent e) {
130
		if(listener != null)
131
			listener.panelHasChanged(new PanelChangeEvent(e));
132
	}
133

  
134
	public void insertUpdate(DocumentEvent e) {
135
		if(listener != null)
136
			listener.panelHasChanged(new PanelChangeEvent(e));
137
	}
138

  
139
	public void removeUpdate(DocumentEvent e) {
140
		if(listener != null)
141
			listener.panelHasChanged(new PanelChangeEvent(e));
142
	}
104 143
}
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/bean/inputlayer/InputLayerImpl.java
23 23

  
24 24
import java.awt.GridBagConstraints;
25 25
import java.awt.GridBagLayout;
26
import java.awt.event.ActionEvent;
27
import java.awt.event.ActionListener;
26 28

  
27 29
import javax.swing.BorderFactory;
28 30
import javax.swing.JComboBox;
......
30 32
import javax.swing.JPanel;
31 33

  
32 34
import org.gvsig.i18n.Messages;
35
import org.gvsig.raster.swing.listener.PanelChangeEvent;
36
import org.gvsig.raster.swing.listener.PanelChangeListener;
37
import org.gvsig.raster.tools.algorithm.swing.bean.LayerComboElement;
33 38

  
34 39
/**
35 40
 * @author Nacho Brodin (nachobrodin@gmail.com)
36 41
 */
37
public class InputLayerImpl extends JPanel {
42
public class InputLayerImpl extends JPanel implements ActionListener {
38 43
	private static final long   serialVersionUID    = 1L;
39 44
	private JComboBox           inputLayerCombo     = null;
40 45
	private JComboBox           bandsSelectorCombo  = null;
......
43 48
	private String              boxLabel            = null;
44 49
	private boolean             borderEnabled       = false;
45 50
	private boolean             labelsEnabled       = false;
51
	private PanelChangeListener listener            = null;
46 52
	
47 53
	public InputLayerImpl(String[] labels, boolean border, boolean labelEnabled) {
48 54
		if(labels != null) {
......
91 97
	}
92 98
	
93 99
	public JComboBox getInputLayerCombo() {
94
		if(inputLayerCombo == null)
100
		if(inputLayerCombo == null) {
95 101
			inputLayerCombo = new JComboBox();
102
			inputLayerCombo.addActionListener(this);
103
		}
96 104
		return inputLayerCombo;
97 105
	}
98 106

  
99 107
	public JComboBox getBandsSelectorCombo() {
100
		if(bandsSelectorCombo == null)
108
		if(bandsSelectorCombo == null) {
101 109
			bandsSelectorCombo = new JComboBox();
110
			bandsSelectorCombo.addActionListener(this);
111
		}
102 112
		return bandsSelectorCombo;
103 113
	}
104 114

  
......
118 128
		getBandsSelectorCombo().setEnabled(enable);
119 129
		getInputLayerCombo().setEnabled(enable);
120 130
	}
131

  
132
	public void actionPerformed(ActionEvent e) {
133
		if(listener != null)
134
			listener.panelHasChanged(new PanelChangeEvent(e));
135
		if(e.getSource() == getInputLayerCombo()) {
136
			if(getInputLayerCombo().getSelectedItem() instanceof LayerComboElement) {
137
				int nElements = ((LayerComboElement)getInputLayerCombo().getSelectedItem()).getNumOfElements();
138
				getBandsSelectorCombo().removeAllItems();
139
				getBandsSelectorCombo().addItem(Messages.getText("all"));
140
				for (int i = 0; i < nElements; i++) {
141
					getBandsSelectorCombo().addItem(i);
142
				}
143
			}
144
		}
145
	}
146
	
147
	public void addPanelChangeEvent(PanelChangeListener listener) {
148
		this.listener = listener;
149
	}
121 150
}
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
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
}
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/OperationMaskThresholdImpl.java
32 32
import javax.swing.JRadioButton;
33 33

  
34 34
import org.gvsig.i18n.Messages;
35
import org.gvsig.raster.swing.listener.PanelChangeEvent;
36
import org.gvsig.raster.swing.listener.PanelChangeListener;
35 37
import org.gvsig.raster.tools.algorithm.swing.impl.bean.combotext.ComboTextImpl;
36 38
import org.gvsig.raster.tools.algorithm.swing.impl.bean.inputlayer.InputLayerImpl;
37 39

  
......
44 46
	private JRadioButton        layerRadio          = null;
45 47
	private InputLayerImpl      layerSelection      = null;
46 48
	private ComboTextImpl       comboText           = null;
49
	private PanelChangeListener listener            = null;
47 50
	
48 51
	public OperationMaskThresholdImpl() {
49 52
		init();
......
122 125
		}
123 126
		return comboText;
124 127
	}
128
	
129
	public void addPanelChangeEvent(PanelChangeListener listener) {
130
		this.listener = listener;
131
		getLayerSelection().addPanelChangeEvent(listener);
132
		getComboText().addPanelChangeEvent(listener);
133
	}
125 134

  
126 135
	public void actionPerformed(ActionEvent e) {
136
		if(listener != null)
137
			listener.panelHasChanged(new PanelChangeEvent(e));
138
		
127 139
		if(e.getSource() == getValueRadio()) {
128 140
			getLayerSelection().setEnabled(false);
129 141
			getComboText().getTextField().setEnabled(true);
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
28 28
import javax.swing.JPanel;
29 29

  
30 30
import org.gvsig.i18n.Messages;
31
import org.gvsig.raster.swing.listener.PanelChangeListener;
31 32
import org.gvsig.raster.tools.algorithm.swing.impl.bean.combotext.ComboTextImpl;
32 33
import org.gvsig.raster.tools.algorithm.swing.impl.bean.inputlayer.InputLayerImpl;
33 34

  
......
35 36
 * @author Nacho Brodin (nachobrodin@gmail.com)
36 37
 */
37 38
public class OutputMaskThresholdImpl extends JPanel {
38
	private static final long   serialVersionUID     = 1L;
39
	private ComboTextImpl       satisfyCombo         = null;
40
	private InputLayerImpl      layerSelection       = null;
39
	private static final long   serialVersionUID    = 1L;
40
	private ComboTextImpl       satisfyCombo        = null;
41
	private InputLayerImpl      layerSelection      = null;
41 42
	
42 43
	public OutputMaskThresholdImpl() {
43 44
		init();
......
53 54
		
54 55
		gridBagConstraints1.gridx = 0;
55 56
		gridBagConstraints1.gridy = 0;
56
		this.add(getLayerSelection(), gridBagConstraints1);
57
		this.add(getMethodOutput(), gridBagConstraints1);
57 58
		
58 59
		gridBagConstraints1.gridx = 0;
59 60
		gridBagConstraints1.gridy = 1;
60
		this.add(getMethodOutput(), gridBagConstraints1);
61
		this.add(getLayerSelection(), gridBagConstraints1);
61 62
		
62 63
		gridBagConstraints1.fill = java.awt.GridBagConstraints.BOTH;
63 64
		gridBagConstraints1.weightx = 1;
......
83 84
		}
84 85
		return layerSelection;
85 86
	}
86

  
87
	
88
	public void addPanelChangeEvent(PanelChangeListener listener) {
89
		getLayerSelection().addPanelChangeEvent(listener);
90
		getMethodOutput().addPanelChangeEvent(listener);
91
	}
87 92
}
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/MaskThresholdDataImpl.java
21 21
*/
22 22
package org.gvsig.raster.tools.algorithm.swing.impl.maskthreshold;
23 23

  
24
import org.gvsig.raster.tools.algorithm.swing.maskthreshold.MaskThresholdData;
25

  
24 26
/**
25 27
 * Data model for the mask threshold user interface
26 28
 * @author Nacho Brodin (nachobrodin@gmail.com)
27 29
 */
28
public class MaskThresholdDataImpl {
30
public class MaskThresholdDataImpl implements MaskThresholdData {
29 31
	private MaskThresholdPanelImpl panel = null;
30 32
	
31 33
	public MaskThresholdDataImpl(MaskThresholdPanelImpl panel) {
......
33 35
	}
34 36
	
35 37
	public Object getInputLayer() {
36
		return panel.getLayerSelection().getInputLayerCombo().getSelectedItem();
38
		Object obj = panel.getLayerSelection().getInputLayerCombo()
39
			.getSelectedItem();
40
		if(obj == null)
41
			return panel.getLayerSelection().getInputLayerCombo().getItemAt(0);
42
		else
43
			return obj;
37 44
	}
38 45
	
39 46
	public int getBandInputLayer() {
40
		return panel.getLayerSelection().getBandsSelectorCombo().getSelectedIndex();
47
		return panel.getLayerSelection().getBandsSelectorCombo()
48
			.getSelectedIndex() - 1;
41 49
	}
42 50
	
43 51
	public int getOperation() {
44
		return panel.getOperationMaskThresholdPanel().getComboText().getCombo().getSelectedIndex();
52
		return panel.getOperationMaskThresholdPanel().getComboText()
53
			.getCombo().getSelectedIndex();
45 54
	}
46 55
	
47 56
	public int getOperationMethod() {
48
		return panel.getOperationMaskThresholdPanel().getLayerRadio().isSelected() ? 1 : 0;
57
		return panel.getOperationMaskThresholdPanel().getLayerRadio()
58
			.isSelected() ? 1 : 0;
49 59
	}
50 60
	
51 61
	public double getThresholdValue() {
......
58 68
	}
59 69
	
60 70
	public Object getOperationLayer() {
61
		return panel.getOperationMaskThresholdPanel().getLayerSelection()
62
			.getInputLayerCombo().getSelectedIndex();
71
		Object obj = panel.getOperationMaskThresholdPanel().getLayerSelection()
72
			.getInputLayerCombo().getSelectedItem();
73
		if(obj == null)
74
			return panel.getOperationMaskThresholdPanel().getLayerSelection()
75
				.getInputLayerCombo().getItemAt(0);
76
		else
77
			return obj;
63 78
	}
64 79
	
65 80
	public int getBandOperationLayer() {
66 81
		return panel.getOperationMaskThresholdPanel().getLayerSelection()
67
			.getBandsSelectorCombo().getSelectedIndex();
82
			.getBandsSelectorCombo().getSelectedIndex() - 1;
68 83
	}
69 84
	
70 85
	public Object getOutputInputLayer() {
71
		return panel.getOutputMaskThresholdPanel().getLayerSelection()
86
		Object obj = panel.getOutputMaskThresholdPanel().getLayerSelection()
72 87
			.getInputLayerCombo().getSelectedItem();
88
		if(obj == null)
89
			return panel.getOutputMaskThresholdPanel().getLayerSelection()
90
				.getInputLayerCombo().getItemAt(0);
91
		else
92
			return obj;
73 93
	}
74 94
	
75 95
	public int getBandOutputLayer() {
76 96
		return panel.getOutputMaskThresholdPanel().getLayerSelection()
77
			.getBandsSelectorCombo().getSelectedIndex();
97
			.getBandsSelectorCombo().getSelectedIndex() - 1;
78 98
	}
79 99
	
80 100
    public int getMethodOutput() {
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/resources/org/gvsig/raster/tools/algorithm/swing/impl/i18n/text/text.properties
14 14
input=Entrada
15 15
layers=Capas
16 16
bands=Bandas
17
output=Salida
17
output=Salida
18
all=Todas
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/resources/org/gvsig/raster/tools/algorithm/swing/impl/i18n/text/text_en.properties
14 14
input=Input
15 15
layers=Layers
16 16
bands=Bands
17
output=Output
17
output=Output
18
all=All
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.swing/org.gvsig.raster.swing.api/src/main/java/org/gvsig/raster/swing/listener/PanelChangeListener.java
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.swing.listener;
23

  
24
import java.util.EventListener;
25

  
26
/**
27
 * @author Nacho Brodin (nachobrodin@gmail.com)
28
 */
29
public interface PanelChangeListener extends EventListener {
30

  
31
	public void panelHasChanged(PanelChangeEvent event);
32
}
0 33

  
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.swing/org.gvsig.raster.swing.api/src/main/java/org/gvsig/raster/swing/listener/PanelChangeEvent.java
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.swing.listener;
23

  
24
import java.util.EventObject;
25

  
26
/**
27
 * @author Nacho Brodin (nachobrodin@gmail.com)
28
 */
29
public class PanelChangeEvent extends EventObject {
30
	private static final long serialVersionUID = 1L;
31

  
32
	/**
33
     * Constructs a ChangeEvent object.
34
     *
35
     * @param source  the Object that is the source of the event
36
     *                (typically <code>this</code>)
37
     */
38
    public PanelChangeEvent(Object source) {
39
        super(source);
40
    }
41
}
0 42

  

Also available in: Unified diff