Statistics
| Revision:

svn-gvsig-desktop / branches / gvSIG_WMSv2 / extensions / extWMS / src / com / iver / cit / gvsig / gui / beans / SamplePanel.java @ 3524

History | View | Annotate | Download (2.65 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2005 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
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41

    
42
/* CVS MESSAGES:
43
 *
44
 * $Id: SamplePanel.java 3524 2005-12-30 08:56:19Z jaume $
45
 * $Log$
46
 * Revision 1.1.2.1  2005-12-30 08:56:19  jaume
47
 * *** empty log message ***
48
 *
49
 *
50
 */
51
/**
52
 * 
53
 */
54
package com.iver.cit.gvsig.gui.beans;
55

    
56
import javax.swing.JFrame;
57
import javax.swing.JPanel;
58

    
59
import com.iver.cit.gvsig.gui.beans.panels.IntervalPanel;
60
import com.iver.cit.gvsig.gui.beans.panels.ItemBrowser;
61

    
62
/**
63
 * @author jaume
64
 *
65
 */
66
public class SamplePanel extends JPanel {
67

    
68
    private ItemBrowser itemBrowser;
69
    /**
70
     * This is the default constructor
71
     */
72
    public SamplePanel() {
73
        super();
74
        initialize();
75
    }
76

    
77
    /**
78
     * This method initializes this
79
     * 
80
     * @return void
81
     */
82
    private void initialize() {
83
        this.setSize(300, 200);
84
        this.setLayout(null);
85
        
86
        this.add(getItemBrowser(), null);
87
        
88
    }
89

    
90
    private ItemBrowser getItemBrowser(){
91
        if (itemBrowser == null){
92
            itemBrowser = new ItemBrowser(1, 20);
93
            itemBrowser.addListener(new BeanListener() {
94
                public void beanValueChanged(Object value) {
95
                    System.err.println("Captured value: "+value);
96
                }
97
            });
98
            itemBrowser.setItemCount(20);
99
        }
100
        return itemBrowser;
101
    }
102
    
103
    public static void main(String[] args){
104
        
105
        JFrame frame = new JFrame();
106
        frame.getContentPane().add(new SamplePanel());
107
        frame.setBounds(0, 0, 279, 63);
108
        frame.pack();
109
        frame.show();
110
    }
111
}