Statistics
| Revision:

root / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / project / documents / gui / ListManagerSkin.java @ 7304

History | View | Annotate | Download (4.98 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
 * 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
package com.iver.cit.gvsig.project.documents.gui;
42

    
43
import java.awt.BorderLayout;
44
import java.awt.FlowLayout;
45
import java.awt.GridLayout;
46

    
47
import javax.swing.JList;
48
import javax.swing.JPanel;
49
import javax.swing.JScrollPane;
50

    
51
import org.gvsig.gui.beans.swing.JButton;
52

    
53
import com.iver.andami.PluginServices;
54
import com.iver.utiles.listManager.ListManager;
55
public class ListManagerSkin extends JPanel {
56

    
57
        private JScrollPane jScrollPane = null;
58
        private JPanel jPanel = null;
59
        private JButton jButton = null;
60
        private JButton jButton1 = null;
61
        private JButton jButton2 = null;
62
        private JButton jButton3 = null;
63

    
64
        private ListManager listManager;// = new ListManager();
65

    
66
        private JList jList = null;
67
        private JPanel jPanel1 = null;
68
        /**
69
         * This method initializes jScrollPane
70
         *
71
         * @return javax.swing.JScrollPane
72
         */
73
        private JScrollPane getJScrollPane() {
74
                if (jScrollPane == null) {
75
                        jScrollPane = new JScrollPane();
76
                        jScrollPane.setViewportView(getJList());
77
                        jScrollPane.setViewportView(getJList());
78
                }
79
                return jScrollPane;
80
        }
81
        /**
82
         * This method initializes jPanel
83
         *
84
         * @return javax.swing.JPanel
85
         */
86
        private JPanel getJPanel() {
87
                if (jPanel == null) {
88
                        FlowLayout flowLayout2 = new FlowLayout();
89
                        jPanel = new JPanel();
90
                        jPanel.setLayout(flowLayout2);
91
                        flowLayout2.setAlignment(java.awt.FlowLayout.RIGHT);
92
                        jPanel.add(getJPanel1(), null);
93
                }
94
                return jPanel;
95
        }
96
        /**
97
         * This method initializes jButton
98
         *
99
         * @return javax.swing.JButton
100
         */
101
        private JButton getJButton() {
102
                if (jButton == null) {
103
                        jButton = new JButton("abajo");
104
                        jButton.setText(PluginServices.getText(this, "abajo"));
105
                }
106
                return jButton;
107
        }
108
        /**
109
         * This method initializes jButton1
110
         *
111
         * @return javax.swing.JButton
112
         */
113
        private JButton getJButton1() {
114
                if (jButton1 == null) {
115
                        jButton1 = new JButton("arriba");
116
                        jButton1.setText(PluginServices.getText(this, "arriba"));
117
                }
118
                return jButton1;
119
        }
120
        /**
121
         * This method initializes jButton2
122
         *
123
         * @return javax.swing.JButton
124
         */
125
        private JButton getJButton2() {
126
                if (jButton2 == null) {
127
                        jButton2 = new JButton("A?adir");
128
                        jButton2.setText(PluginServices.getText(this, "Anadir"));
129
                }
130
                return jButton2;
131
        }
132
        /**
133
         * This method initializes jButton3
134
         *
135
         * @return javax.swing.JButton
136
         */
137
        private JButton getJButton3() {
138
                if (jButton3 == null) {
139
                        jButton3 = new JButton("Eliminar");
140
                        jButton3.setText(PluginServices.getText(this, "Eliminar"));
141
                }
142
                return jButton3;
143
        }
144
        /**
145
         * This method initializes jList
146
         *
147
         * @return javax.swing.JList
148
         */
149
        private JList getJList() {
150
                if (jList == null) {
151
                        jList = new JList();
152
                }
153
                return jList;
154
        }
155
                 /**
156
         * This is the default constructor
157
         */
158
        public ListManagerSkin(boolean down) {
159
                super();
160
                listManager = new ListManager(down);
161
                initialize();
162
        }
163
        /**
164
         * This method initializes this
165
         *
166
         * @return void
167
         */
168
        private  void initialize() {
169
                this.setLayout(new BorderLayout());
170
                this.setSize(421, 349);
171
                this.add(getJScrollPane(), java.awt.BorderLayout.CENTER);
172
                this.add(getJPanel(), java.awt.BorderLayout.EAST);
173
                listManager.setBtnDown(getJButton());
174
                listManager.setBtnUp(getJButton1());
175
                listManager.setBtnAdd(getJButton2());
176
                listManager.setBtnDel(getJButton3());
177
                listManager.setList(getJList());
178
                listManager.initialize();
179

    
180
        }
181
        /**
182
         * @return Returns the listManager.
183
         */
184
        public ListManager getListManager() {
185
                return listManager;
186
        }
187
        /**
188
         * This method initializes jPanel1
189
         *
190
         * @return javax.swing.JPanel
191
         */
192
        private JPanel getJPanel1() {
193
                if (jPanel1 == null) {
194
                        jPanel1 = new JPanel(new GridLayout(6, 1, 5, 5));
195

    
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"