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