gvsig-raster / org.gvsig.raster.netcdf / trunk / org.gvsig.raster.netcdf / org.gvsig.raster.netcdf.app / org.gvsig.raster.netcdf.app.netcdfclient / src / main / java / org / gvsig / raster / netcdf / app / netcdfclient / gui / panel / UpDownPanel.java @ 1174
History | View | Annotate | Download (2.22 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 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.raster.netcdf.app.netcdfclient.gui.panel; |
20 |
|
21 |
import java.awt.GridBagConstraints; |
22 |
import java.awt.GridBagLayout; |
23 |
|
24 |
import javax.swing.JButton; |
25 |
import javax.swing.JPanel; |
26 |
|
27 |
import org.gvsig.andami.IconThemeHelper; |
28 |
|
29 |
/**
|
30 |
* Panel for up and down button
|
31 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
32 |
*/
|
33 |
public class UpDownPanel extends JPanel { |
34 |
private static final long serialVersionUID = 1L; |
35 |
private JButton up = null; |
36 |
private JButton down = null; |
37 |
|
38 |
public UpDownPanel() {
|
39 |
init(); |
40 |
} |
41 |
|
42 |
private void init() { |
43 |
setLayout(new GridBagLayout()); |
44 |
|
45 |
GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); |
46 |
gridBagConstraints1.fill = GridBagConstraints.BOTH;
|
47 |
gridBagConstraints1.anchor = GridBagConstraints.CENTER;
|
48 |
gridBagConstraints1.weightx = 1.0;
|
49 |
gridBagConstraints1.weighty = 1.0;
|
50 |
|
51 |
add(getDownButton(), gridBagConstraints1); |
52 |
|
53 |
gridBagConstraints1.gridx = 1;
|
54 |
add(getUpButton(), gridBagConstraints1); |
55 |
} |
56 |
|
57 |
public JButton getUpButton() { |
58 |
if(up == null) { |
59 |
up = new JButton(IconThemeHelper.getImageIcon("nextarrow-icon")); |
60 |
//up.setPreferredSize(new Dimension(32, 12));
|
61 |
} |
62 |
return up;
|
63 |
} |
64 |
|
65 |
public JButton getDownButton() { |
66 |
if(down == null) { |
67 |
down = new JButton(IconThemeHelper.getImageIcon("prevarrow-icon")); |
68 |
//down.setPreferredSize(new Dimension(32, 12));
|
69 |
} |
70 |
return down;
|
71 |
} |
72 |
} |