svn-gvsig-desktop / trunk / libraries / libUIComponent / src-test / org / gvsig / gui / beans / doubleslider / TestDoubleSlider.java @ 11004
History | View | Annotate | Download (1.24 KB)
1 | 11004 | bsanchez | package org.gvsig.gui.beans.doubleslider; |
---|---|---|---|
2 | |||
3 | import java.awt.BorderLayout; |
||
4 | import java.awt.Dimension; |
||
5 | |||
6 | import javax.swing.JButton; |
||
7 | import javax.swing.JFrame; |
||
8 | import javax.swing.JPanel; |
||
9 | |||
10 | import org.gvsig.gui.beans.doubleslider.DoubleSlider; |
||
11 | |||
12 | public class TestDoubleSlider { |
||
13 | |||
14 | private JFrame jFrame = new JFrame(); |
||
15 | private DoubleSlider doubleSlider = null; |
||
16 | private JPanel jPanel = null; |
||
17 | |||
18 | public TestDoubleSlider() {
|
||
19 | jFrame = new JFrame(); |
||
20 | jFrame.getContentPane().setLayout(new BorderLayout()); |
||
21 | jFrame.setSize(new Dimension(498, 267)); |
||
22 | jFrame.setContentPane(getJPanel()); |
||
23 | jFrame.show(); |
||
24 | } |
||
25 | |||
26 | /**
|
||
27 | * This method initializes multiSlider
|
||
28 | *
|
||
29 | * @return borsanza.src.multislider.MultiSlider
|
||
30 | */
|
||
31 | private DoubleSlider getMultiSlider() {
|
||
32 | if (doubleSlider == null) { |
||
33 | doubleSlider = new DoubleSlider();
|
||
34 | doubleSlider.setMinimum(0);
|
||
35 | doubleSlider.setMaximum(255);
|
||
36 | } |
||
37 | return doubleSlider;
|
||
38 | } |
||
39 | |||
40 | /**
|
||
41 | * This method initializes jPanel
|
||
42 | *
|
||
43 | * @return javax.swing.JPanel
|
||
44 | */
|
||
45 | private JPanel getJPanel() { |
||
46 | if (jPanel == null) { |
||
47 | jPanel = new JPanel(); |
||
48 | jPanel.setLayout(new BorderLayout()); |
||
49 | jPanel.add(getMultiSlider(), BorderLayout.CENTER);
|
||
50 | } |
||
51 | return jPanel;
|
||
52 | } |
||
53 | |||
54 | public static void main(String[] args) { |
||
55 | new TestDoubleSlider();
|
||
56 | } |
||
57 | } |