Revision 12180 trunk/libraries/libUIComponent/src-test-ui/org/gvsig/gui/beans/slidertext/TestSliderTextTable.java
TestSliderTextTable.java | ||
---|---|---|
20 | 20 |
|
21 | 21 |
import javax.swing.JFrame; |
22 | 22 |
|
23 |
public class TestSliderTextTable { |
|
23 |
import org.gvsig.gui.beans.slidertext.listeners.SliderEvent; |
|
24 |
import org.gvsig.gui.beans.slidertext.listeners.SliderListener; |
|
25 |
|
|
26 |
public class TestSliderTextTable implements SliderListener { |
|
24 | 27 |
private int w = 350, h = 150; |
25 | 28 |
private JFrame frame=new JFrame(); |
26 | 29 |
private SliderTextContainer slider = null; |
27 | 30 |
|
28 | 31 |
public TestSliderTextTable() { |
29 | 32 |
slider = new SliderTextContainer(-255, 255, 0); |
33 |
slider.addValueChangedListener(this); |
|
30 | 34 |
|
31 | 35 |
frame.getContentPane().add(slider); |
32 | 36 |
frame.setSize(w, h); |
... | ... | |
37 | 41 |
public static void main(String[] args) { |
38 | 42 |
new TestSliderTextTable(); |
39 | 43 |
} |
44 |
|
|
45 |
public void actionValueChanged(SliderEvent e) { |
|
46 |
System.out.println("- Changed: " + slider.getValue()); |
|
47 |
} |
|
48 |
|
|
49 |
public void actionValueDragged(SliderEvent e) { |
|
50 |
// System.out.println("+ Dragged: " + slider.getValue()); |
|
51 |
} |
|
40 | 52 |
} |
Also available in: Unified diff