Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libUIComponent / src-test-ui / org / gvsig / gui / beans / propertiespanel / ui / TestSlider.java @ 12013

History | View | Annotate | Download (1.96 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
*
3
* Copyright (C) 2007 IVER T.I. and Generalitat Valenciana.
4
*
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
*/
19
package org.gvsig.gui.beans.propertiespanel.ui;
20

    
21
import java.awt.BorderLayout;
22
import java.awt.event.ActionEvent;
23
import java.awt.event.ActionListener;
24

    
25
import javax.swing.JButton;
26
import javax.swing.JColorChooser;
27
import javax.swing.event.ChangeEvent;
28
import javax.swing.event.ChangeListener;
29

    
30
import org.gvsig.gui.beans.propertiespanel.JPanelProperty;
31
/**
32
 * Panel que ira dentro del panel de propiedades
33
 *
34
 * @version 06/06/2007
35
 * @author Borja S?nchez Zamorano (borja.sanchez@iver.es)
36
 */
37
public class TestSlider extends JPanelProperty implements ChangeListener, ActionListener {
38
        private static final long        serialVersionUID        = -4936433530376831937L;
39

    
40
        public TestSlider() {
41
                initialize();
42
        }
43

    
44
        private void initialize() {
45
                this.setLayout(new BorderLayout());
46
                JColorChooser color = new JColorChooser();
47
                this.add(color, BorderLayout.CENTER);
48
                JButton boton = new JButton("OK");
49
                this.add(boton, BorderLayout.SOUTH);
50
                boton.addActionListener(this);
51
                color.getSelectionModel().addChangeListener(this);
52
        }
53

    
54
        public void stateChanged(ChangeEvent e) {
55
                this.callStateChanged();
56
        }
57

    
58
        public void actionPerformed(ActionEvent e) {
59
                this.callStateChanged();
60
        }
61
}