root / branches / gvSIG_03_SLD / applications / appgvSIG / src / com / iver / cit / gvsig / gui / ListManagerSkin.java @ 2106
History | View | Annotate | Download (4.94 KB)
1 | 1103 | fjp | /* 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 | * 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 | 1025 | fernando | package com.iver.cit.gvsig.gui; |
42 | |||
43 | import javax.swing.JPanel; |
||
44 | |||
45 | |||
46 | import java.awt.BorderLayout; |
||
47 | import java.awt.Dimension; |
||
48 | |||
49 | import javax.swing.JScrollPane; |
||
50 | import javax.swing.JList; |
||
51 | import javax.swing.JButton; |
||
52 | |||
53 | import com.iver.andami.PluginServices; |
||
54 | import com.iver.utiles.listManager.ListManager; |
||
55 | |||
56 | import java.awt.FlowLayout; |
||
57 | public class ListManagerSkin extends JPanel { |
||
58 | |||
59 | private JScrollPane jScrollPane = null; |
||
60 | private JPanel jPanel = null; |
||
61 | private JButton jButton = null; |
||
62 | private JButton jButton1 = null; |
||
63 | private JButton jButton2 = null; |
||
64 | private JButton jButton3 = null; |
||
65 | |||
66 | private ListManager listManager = new ListManager(); |
||
67 | |||
68 | private JList jList = null; |
||
69 | private JPanel jPanel1 = null; |
||
70 | /**
|
||
71 | * This method initializes jScrollPane
|
||
72 | *
|
||
73 | * @return javax.swing.JScrollPane
|
||
74 | */
|
||
75 | private JScrollPane getJScrollPane() { |
||
76 | if (jScrollPane == null) { |
||
77 | jScrollPane = new JScrollPane(); |
||
78 | jScrollPane.setViewportView(getJList()); |
||
79 | jScrollPane.setViewportView(getJList()); |
||
80 | } |
||
81 | return jScrollPane;
|
||
82 | } |
||
83 | /**
|
||
84 | * This method initializes jPanel
|
||
85 | *
|
||
86 | * @return javax.swing.JPanel
|
||
87 | */
|
||
88 | private JPanel getJPanel() { |
||
89 | if (jPanel == null) { |
||
90 | FlowLayout flowLayout2 = new FlowLayout(); |
||
91 | jPanel = new JPanel(); |
||
92 | jPanel.setLayout(flowLayout2); |
||
93 | flowLayout2.setAlignment(java.awt.FlowLayout.RIGHT); |
||
94 | jPanel.add(getJPanel1(), null);
|
||
95 | } |
||
96 | return jPanel;
|
||
97 | } |
||
98 | /**
|
||
99 | * This method initializes jButton
|
||
100 | *
|
||
101 | * @return javax.swing.JButton
|
||
102 | */
|
||
103 | private JButton getJButton() { |
||
104 | if (jButton == null) { |
||
105 | 1529 | luisw | jButton = new JButton("abajo"); |
106 | 1500 | fjp | jButton.setText(PluginServices.getText(this, "abajo")); |
107 | 1025 | fernando | } |
108 | return jButton;
|
||
109 | } |
||
110 | /**
|
||
111 | * This method initializes jButton1
|
||
112 | *
|
||
113 | * @return javax.swing.JButton
|
||
114 | */
|
||
115 | private JButton getJButton1() { |
||
116 | if (jButton1 == null) { |
||
117 | 1529 | luisw | jButton1 = new JButton("arriba"); |
118 | 1500 | fjp | jButton1.setText(PluginServices.getText(this, "arriba")); |
119 | 1025 | fernando | } |
120 | return jButton1;
|
||
121 | } |
||
122 | /**
|
||
123 | * This method initializes jButton2
|
||
124 | *
|
||
125 | * @return javax.swing.JButton
|
||
126 | */
|
||
127 | private JButton getJButton2() { |
||
128 | if (jButton2 == null) { |
||
129 | 1529 | luisw | jButton2 = new JButton("A?adir"); |
130 | 1025 | fernando | jButton2.setText(PluginServices.getText(this, "Anadir")); |
131 | } |
||
132 | return jButton2;
|
||
133 | } |
||
134 | /**
|
||
135 | * This method initializes jButton3
|
||
136 | *
|
||
137 | * @return javax.swing.JButton
|
||
138 | */
|
||
139 | private JButton getJButton3() { |
||
140 | if (jButton3 == null) { |
||
141 | 1529 | luisw | jButton3 = new JButton("Eliminar"); |
142 | 1025 | fernando | jButton3.setText(PluginServices.getText(this, "Eliminar")); |
143 | } |
||
144 | return jButton3;
|
||
145 | } |
||
146 | /**
|
||
147 | * This method initializes jList
|
||
148 | *
|
||
149 | * @return javax.swing.JList
|
||
150 | */
|
||
151 | private JList getJList() { |
||
152 | if (jList == null) { |
||
153 | jList = new JList(); |
||
154 | } |
||
155 | return jList;
|
||
156 | } |
||
157 | /**
|
||
158 | * This is the default constructor
|
||
159 | */
|
||
160 | public ListManagerSkin() {
|
||
161 | super();
|
||
162 | initialize(); |
||
163 | } |
||
164 | /**
|
||
165 | * This method initializes this
|
||
166 | *
|
||
167 | * @return void
|
||
168 | */
|
||
169 | private void initialize() { |
||
170 | this.setLayout(new BorderLayout()); |
||
171 | this.setSize(300, 248); |
||
172 | this.add(getJScrollPane(), java.awt.BorderLayout.CENTER);
|
||
173 | this.add(getJPanel(), java.awt.BorderLayout.EAST);
|
||
174 | listManager.setBtnDown(getJButton()); |
||
175 | listManager.setBtnUp(getJButton1()); |
||
176 | listManager.setBtnAdd(getJButton2()); |
||
177 | listManager.setBtnDel(getJButton3()); |
||
178 | listManager.setList(getJList()); |
||
179 | listManager.initialize(); |
||
180 | |||
181 | } |
||
182 | /**
|
||
183 | * @return Returns the listManager.
|
||
184 | */
|
||
185 | public ListManager getListManager() {
|
||
186 | return listManager;
|
||
187 | } |
||
188 | /**
|
||
189 | * This method initializes jPanel1
|
||
190 | *
|
||
191 | * @return javax.swing.JPanel
|
||
192 | */
|
||
193 | private JPanel getJPanel1() { |
||
194 | if (jPanel1 == null) { |
||
195 | jPanel1 = new JPanel(); |
||
196 | jPanel1.setPreferredSize(new java.awt.Dimension(100,180)); |
||
197 | jPanel1.add(getJButton2(), null);
|
||
198 | jPanel1.add(getJButton3(), null);
|
||
199 | jPanel1.add(getJButton1(), null);
|
||
200 | jPanel1.add(getJButton(), null);
|
||
201 | } |
||
202 | return jPanel1;
|
||
203 | } |
||
204 | } // @jve:decl-index=0:visual-constraint="10,10" |