Statistics
| Revision:

root / trunk / libraries / libUIComponent / src-test / org / gvsig / gui / beans / graphic / TestGraphic.java @ 11004

History | View | Annotate | Download (777 Bytes)

1
package org.gvsig.gui.beans.graphic;
2

    
3
import javax.swing.JFrame;
4

    
5
import org.gvsig.gui.beans.table.exceptions.NotInitializeException;
6

    
7
public class TestGraphic implements GraphicListener {
8
        private JFrame                                 frame=new JFrame();
9
        private GraphicContainer        graphic = null;
10
        
11
        public TestGraphic() throws NotInitializeException{
12
                graphic = new GraphicContainer(true);
13
                graphic.addValueChangedListener(this);
14
                frame.getContentPane().add(graphic);
15
                frame.setSize(500, 300);
16
                frame.show();
17
        }
18
        
19
        public static void main(String[] args) {
20
                try{
21
                        new TestGraphic();
22
                } catch (NotInitializeException ex){
23
                        System.out.println("Tabla no inicializada");
24
                }
25
        }
26

    
27
        public void actionValueChanged(GraphicEvent e) {
28
                System.out.println(graphic.getX1() + ":" + graphic.getX2());
29
        }
30
}