svn-gvsig-desktop / trunk / libraries / libUIComponent / src-test / org / gvsig / gui / beans / slidertext / TestSliderTextTable.java @ 10741
History | View | Annotate | Download (1.25 KB)
1 | 10741 | nacho | package org.gvsig.gui.beans.slidertext; |
---|---|---|---|
2 | |||
3 | import java.awt.event.ComponentEvent; |
||
4 | import java.awt.event.ComponentListener; |
||
5 | |||
6 | import javax.swing.JFrame; |
||
7 | |||
8 | import org.gvsig.gui.beans.table.exceptions.NotInitializeException; |
||
9 | |||
10 | public class TestSliderTextTable implements ComponentListener{ |
||
11 | private int w = 350, h = 150; |
||
12 | private JFrame frame=new JFrame(); |
||
13 | private SliderTextContainer slider = null; |
||
14 | |||
15 | public TestSliderTextTable() throws NotInitializeException{ |
||
16 | slider = new SliderTextContainer(0, 100, 100); |
||
17 | slider.setDecimal(false);
|
||
18 | frame.addComponentListener(this);
|
||
19 | |||
20 | frame.getContentPane().add(slider); |
||
21 | frame.setSize(w, h); |
||
22 | frame.setVisible(true);
|
||
23 | } |
||
24 | |||
25 | public static void main(String[] args) { |
||
26 | try{
|
||
27 | TestSliderTextTable slider = new TestSliderTextTable();
|
||
28 | }catch(NotInitializeException ex){
|
||
29 | System.out.println("Tabla no inicializada"); |
||
30 | } |
||
31 | } |
||
32 | |||
33 | public void componentHidden(ComponentEvent e) { |
||
34 | // TODO Auto-generated method stub
|
||
35 | |||
36 | } |
||
37 | |||
38 | public void componentMoved(ComponentEvent e) { |
||
39 | // TODO Auto-generated method stub
|
||
40 | |||
41 | } |
||
42 | |||
43 | public void componentResized(ComponentEvent e) { |
||
44 | slider.setComponentSize(frame.getWidth() - 12, frame.getHeight() - 45); |
||
45 | } |
||
46 | |||
47 | public void componentShown(ComponentEvent e) { |
||
48 | // TODO Auto-generated method stub
|
||
49 | |||
50 | } |
||
51 | } |