gvsig-raster / org.gvsig.raster.wmts / trunk / org.gvsig.raster.wmts / org.gvsig.raster.wmts.swing / org.gvsig.raster.wmts.swing.impl / src / main / java / org / gvsig / raster / wmts / swing / impl / panel / layer / AddDelLayerPanel.java @ 2613
History | View | Annotate | Download (3.42 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
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 2
|
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 |
*/
|
22 |
package org.gvsig.raster.wmts.swing.impl.panel.layer; |
23 |
|
24 |
import java.awt.GridBagConstraints; |
25 |
import java.awt.GridBagLayout; |
26 |
|
27 |
import javax.swing.JButton; |
28 |
import javax.swing.JPanel; |
29 |
|
30 |
import org.gvsig.i18n.Messages; |
31 |
|
32 |
/**
|
33 |
* Layer list panel
|
34 |
*
|
35 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
36 |
*/
|
37 |
public class AddDelLayerPanel extends JPanel { |
38 |
private static final long serialVersionUID = 1L; |
39 |
|
40 |
private JButton btnAdd = null; |
41 |
private JButton btnRemove = null; |
42 |
private JPanel jPanelAddRemoveLayer = null; |
43 |
|
44 |
public AddDelLayerPanel() {
|
45 |
init(); |
46 |
} |
47 |
|
48 |
private void init() { |
49 |
setLayout(new GridBagLayout()); |
50 |
|
51 |
GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); |
52 |
gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
|
53 |
gridBagConstraints1.weightx = 1.0;
|
54 |
gridBagConstraints1.insets = new java.awt.Insets(0, 2, 0, 2); |
55 |
add(getJPanelAddRemoveLayer(), gridBagConstraints1); |
56 |
} |
57 |
|
58 |
/**
|
59 |
* This method initializes jPanel4
|
60 |
* @return Panel
|
61 |
*/
|
62 |
private JPanel getJPanelAddRemoveLayer() { |
63 |
if (jPanelAddRemoveLayer == null) { |
64 |
jPanelAddRemoveLayer = new JPanel(); |
65 |
jPanelAddRemoveLayer.setLayout(new GridBagLayout()); |
66 |
|
67 |
GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); |
68 |
gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
|
69 |
gridBagConstraints1.anchor = GridBagConstraints.WEST;
|
70 |
gridBagConstraints1.weightx = 1.0;
|
71 |
gridBagConstraints1.insets = new java.awt.Insets(2, 2, 2, 2); |
72 |
|
73 |
jPanelAddRemoveLayer.add(/*getChkInvertAxisOrder()*/new JPanel(), gridBagConstraints1); |
74 |
|
75 |
gridBagConstraints1.anchor = GridBagConstraints.EAST;
|
76 |
gridBagConstraints1.weightx = 0.0;
|
77 |
gridBagConstraints1.gridx = 1;
|
78 |
jPanelAddRemoveLayer.add(getBtnAdd(), gridBagConstraints1); |
79 |
|
80 |
gridBagConstraints1.gridx = 2;
|
81 |
jPanelAddRemoveLayer.add(getBtnRemove(), gridBagConstraints1); |
82 |
} |
83 |
|
84 |
return jPanelAddRemoveLayer;
|
85 |
} |
86 |
|
87 |
/**
|
88 |
* This method initializes btnConnect
|
89 |
* @return javax.swing.JButton
|
90 |
*/
|
91 |
public JButton getBtnAdd() { |
92 |
if (btnAdd == null) { |
93 |
btnAdd = new JButton(); |
94 |
btnAdd.setPreferredSize(new java.awt.Dimension(100, 20)); |
95 |
btnAdd.setText(Messages.getText("add"));
|
96 |
} |
97 |
return btnAdd;
|
98 |
} |
99 |
|
100 |
/**
|
101 |
* This method initializes btnCancel
|
102 |
* @return javax.swing.JButton
|
103 |
*/
|
104 |
public JButton getBtnRemove() { |
105 |
if (btnRemove == null) { |
106 |
btnRemove = new JButton(); |
107 |
btnRemove.setEnabled(false);
|
108 |
btnRemove.setPreferredSize(new java.awt.Dimension(100, 20)); |
109 |
btnRemove.setText(Messages.getText("remove"));
|
110 |
} |
111 |
return btnRemove;
|
112 |
} |
113 |
} |