Revision 11004 trunk/libraries/libUIComponent/src-test/org/gvsig/gui/beans/graphic/TestGraphic.java
TestGraphic.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gui.beans.table.exceptions.NotInitializeException; |
6 | 6 |
|
7 |
public class TestGraphic { |
|
7 |
public class TestGraphic implements GraphicListener {
|
|
8 | 8 |
private JFrame frame=new JFrame(); |
9 | 9 |
private GraphicContainer graphic = null; |
10 | 10 |
|
11 | 11 |
public TestGraphic() throws NotInitializeException{ |
12 | 12 |
graphic = new GraphicContainer(true); |
13 |
graphic.addValueChangedListener(this); |
|
13 | 14 |
frame.getContentPane().add(graphic); |
14 | 15 |
frame.setSize(500, 300); |
15 | 16 |
frame.show(); |
... | ... | |
22 | 23 |
System.out.println("Tabla no inicializada"); |
23 | 24 |
} |
24 | 25 |
} |
26 |
|
|
27 |
public void actionValueChanged(GraphicEvent e) { |
|
28 |
System.out.println(graphic.getX1() + ":" + graphic.getX2()); |
|
29 |
} |
|
25 | 30 |
} |
Also available in: Unified diff