Statistics
| Revision:

svn-gvsig-desktop / tags / v1_0_2_Build_916 / libraries / libIverUtiles / src / com / iver / utiles / listManager / ListManagerDemoSkin.java @ 12327

History | View | Annotate | Download (4.62 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.utiles.listManager;
42

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

    
46
import javax.swing.JButton;
47
import javax.swing.JList;
48
import javax.swing.JPanel;
49
import javax.swing.JScrollPane;
50
public class ListManagerDemoSkin extends JPanel {
51

    
52
        private JScrollPane jScrollPane = null;
53
        private JPanel jPanel = null;
54
        private JButton jButton = null;
55
        private JButton jButton1 = null;
56
        private JButton jButton2 = null;
57
        private JButton jButton3 = null;
58

    
59
        private ListManager listManager = new ListManager(true);
60

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

    
174
        }
175
        /**
176
         * @return Returns the listManager.
177
         */
178
        public ListManager getListManager() {
179
                return listManager;
180
        }
181
        /**
182
         * This method initializes jPanel1
183
         *
184
         * @return javax.swing.JPanel
185
         */
186
        private JPanel getJPanel1() {
187
                if (jPanel1 == null) {
188
                        jPanel1 = new JPanel();
189
                        jPanel1.setPreferredSize(new java.awt.Dimension(100,180));
190
                        jPanel1.add(getJButton2(), null);
191
                        jPanel1.add(getJButton3(), null);
192
                        jPanel1.add(getJButton1(), null);
193
                        jPanel1.add(getJButton(), null);
194
                }
195
                return jPanel1;
196
        }
197
}  //  @jve:decl-index=0:visual-constraint="10,10"