svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.ui / src / test / java / org / gvsig / gui / beans / swing / textBoxWithCalendar / TestJCalendarCDatePanel.java @ 40561
History | View | Annotate | Download (3.2 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 3
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
package org.gvsig.gui.beans.swing.textBoxWithCalendar; |
25 |
|
26 |
import java.awt.Dimension; |
27 |
import java.io.Serializable; |
28 |
|
29 |
import javax.swing.JFrame; |
30 |
|
31 |
|
32 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
33 |
*
|
34 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
35 |
*
|
36 |
* This program is free software; you can redistribute it and/or
|
37 |
* modify it under the terms of the GNU General Public License
|
38 |
* as published by the Free Software Foundation; either version 2
|
39 |
* of the License, or (at your option) any later version.
|
40 |
*
|
41 |
* This program is distributed in the hope that it will be useful,
|
42 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
43 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
44 |
* GNU General Public License for more details.
|
45 |
*
|
46 |
* You should have received a copy of the GNU General Public License
|
47 |
* along with this program; if not, write to the Free Software
|
48 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
49 |
*
|
50 |
* For more information, contact:
|
51 |
*
|
52 |
* Generalitat Valenciana
|
53 |
* Conselleria d'Infraestructures i Transport
|
54 |
* Av. Blasco Ib??ez, 50
|
55 |
* 46010 VALENCIA
|
56 |
* SPAIN
|
57 |
*
|
58 |
* +34 963862235
|
59 |
* gvsig@gva.es
|
60 |
* www.gvsig.gva.es
|
61 |
*
|
62 |
* or
|
63 |
*
|
64 |
* IVER T.I. S.A
|
65 |
* Salamanca 50
|
66 |
* 46005 Valencia
|
67 |
* Spain
|
68 |
*
|
69 |
* +34 963163400
|
70 |
* dac@iver.es
|
71 |
*/
|
72 |
|
73 |
/**
|
74 |
* Tests the JCalendarCDatePanel -> creates a JFrame that allows use a JCalendarCDatePanel object
|
75 |
*
|
76 |
* @author Pablo Piqueras Bartolom? (p_queras@hotmail.com)
|
77 |
*/
|
78 |
public class TestJCalendarCDatePanel extends JFrame implements Serializable { |
79 |
private static final long serialVersionUID = 8633128258748487018L; |
80 |
|
81 |
/**
|
82 |
* Test method for the CalendarPanelTest
|
83 |
* @param args
|
84 |
*/
|
85 |
public static void main(String[] args) |
86 |
{ |
87 |
int width = 500; |
88 |
int height = 30; |
89 |
|
90 |
// Objects creation
|
91 |
JFrame jF = new JFrame(); |
92 |
JCalendarCDatePanel t = new JCalendarCDatePanel();
|
93 |
|
94 |
// Set properties
|
95 |
jF.setTitle("Test JCalendarCDatePanel");
|
96 |
jF.setSize(new Dimension(width, height)); |
97 |
jF.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
98 |
jF.getContentPane().add(t); |
99 |
|
100 |
jF.setVisible(true);
|
101 |
|
102 |
// Test Resize the component:
|
103 |
t.setPreferredSizeResize(500, 24); |
104 |
|
105 |
// Test Disable Calendar Selection
|
106 |
//t.disableCalendar();
|
107 |
} |
108 |
} |