Revision 12180 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/properties/panels/TransparencyPanel.java
TransparencyPanel.java | ||
---|---|---|
24 | 24 |
|
25 | 25 |
import javax.swing.JCheckBox; |
26 | 26 |
import javax.swing.JPanel; |
27 |
import javax.swing.event.ChangeEvent; |
|
28 |
import javax.swing.event.ChangeListener; |
|
29 | 27 |
|
30 | 28 |
import org.gvsig.gui.beans.checkslidertext.CheckSliderTextContainer; |
29 |
import org.gvsig.gui.beans.slidertext.listeners.SliderEvent; |
|
30 |
import org.gvsig.gui.beans.slidertext.listeners.SliderListener; |
|
31 | 31 |
import org.gvsig.raster.shared.IRasterProperties; |
32 | 32 |
import org.gvsig.rastertools.properties.control.TransparencyControl; |
33 | 33 |
import org.gvsig.rastertools.properties.dialog.IRegistrablePanel; |
... | ... | |
39 | 39 |
* |
40 | 40 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
41 | 41 |
*/ |
42 |
public class TransparencyPanel extends JPanel implements ActionListener, IRegistrablePanel, ChangeListener {
|
|
42 |
public class TransparencyPanel extends JPanel implements ActionListener, IRegistrablePanel, SliderListener {
|
|
43 | 43 |
private static final long serialVersionUID = -4556920949255458471L; |
44 | 44 |
private IRasterProperties op = null; |
45 | 45 |
|
... | ... | |
117 | 117 |
pOpacity = new CheckSliderTextContainer(0, 100, 100, false, PluginServices.getText(this, "activar"), false); |
118 | 118 |
pOpacity.setDecimal(false); |
119 | 119 |
pOpacity.setBorder(PluginServices.getText(this, "opacidad")); |
120 |
pOpacity.addChangeListener(this);
|
|
120 |
pOpacity.addValueChangedListener(this);
|
|
121 | 121 |
} |
122 | 122 |
|
123 | 123 |
return pOpacity; |
... | ... | |
247 | 247 |
|
248 | 248 |
/* |
249 | 249 |
* (non-Javadoc) |
250 |
* @see javax.swing.event.ChangeListener#stateChanged(javax.swing.event.ChangeEvent)
|
|
250 |
* @see org.gvsig.rastertools.properties.dialog.IRegistrablePanel#selectTab(java.lang.String)
|
|
251 | 251 |
*/ |
252 |
public void stateChanged(ChangeEvent e) { |
|
253 |
tControl.onlyApply(); |
|
254 |
} |
|
252 |
public void selectTab(String id) {} |
|
255 | 253 |
|
256 | 254 |
/* |
257 | 255 |
* (non-Javadoc) |
258 |
* @see org.gvsig.rastertools.properties.dialog.IRegistrablePanel#selectTab(java.lang.String)
|
|
256 |
* @see org.gvsig.rastertools.properties.dialog.IResizable#setComponentSize(int, int)
|
|
259 | 257 |
*/ |
260 |
public void selectTab(String id) {}
|
|
258 |
public void setComponentSize(int w, int h) {}
|
|
261 | 259 |
|
262 | 260 |
/* |
263 | 261 |
* (non-Javadoc) |
264 |
* @see org.gvsig.rastertools.properties.dialog.IResizable#setComponentSize(int, int)
|
|
262 |
* @see org.gvsig.gui.beans.slidertext.listeners.SliderListener#actionValueChanged(org.gvsig.gui.beans.slidertext.listeners.SliderEvent)
|
|
265 | 263 |
*/ |
266 |
public void setComponentSize(int w, int h) {} |
|
264 |
public void actionValueChanged(SliderEvent e) { |
|
265 |
tControl.onlyApply(); |
|
266 |
} |
|
267 |
|
|
268 |
/* |
|
269 |
* (non-Javadoc) |
|
270 |
* @see org.gvsig.gui.beans.slidertext.listeners.SliderListener#actionValueDragged(org.gvsig.gui.beans.slidertext.listeners.SliderEvent) |
|
271 |
*/ |
|
272 |
public void actionValueDragged(SliderEvent e) {} |
|
267 | 273 |
} |
Also available in: Unified diff