Revision 8814 org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.osm/org.gvsig.osm.swing/org.gvsig.osm.swing.impl/src/main/java/org/gvsig/osm/swing/impl/DefaultOSMParametersPanelView.java

View differences:

DefaultOSMParametersPanelView.java
9 9
import javax.swing.ImageIcon;
10 10
import javax.swing.JButton;
11 11
import javax.swing.JCheckBox;
12
import javax.swing.JFormattedTextField;
13
import javax.swing.JLabel;
14 12
import javax.swing.JPanel;
15 13
import javax.swing.JScrollPane;
16 14
import javax.swing.JTable;
17
import javax.swing.JTextField;
18 15

  
19 16
import com.jgoodies.forms.layout.CellConstraints;
20 17
import com.jgoodies.forms.layout.FormLayout;
......
23 20
public class DefaultOSMParametersPanelView extends JPanel
24 21
{
25 22
   JTable tblServers = new JTable();
26
   JLabel lblName = new JLabel();
27
   JTextField txtName = new JTextField();
28
   JLabel lblUrl = new JLabel();
29
   JLabel lblLevels = new JLabel();
30
   JLabel lblFormat = new JLabel();
31
   JLabel lblApiKey = new JLabel();
32
   JTextField txtUrl = new JTextField();
33
   JTextField txtFormat = new JTextField();
34
   JTextField txtApiKey = new JTextField();
35
   JFormattedTextField txtLevels = new JFormattedTextField();
36
   JButton btnUpdate = new JButton();
23
   JButton btnEdit = new JButton();
37 24
   JButton btnAdd = new JButton();
38 25
   JButton btnRemove = new JButton();
39 26
   JCheckBox chkRefreshLocalCache = new JCheckBox();
......
140 127
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
141 128
      jpanel1.add(jscrollpane1,new CellConstraints(2,2,1,1,CellConstraints.FILL,CellConstraints.FILL));
142 129

  
143
      jpanel1.add(createPanel1(),new CellConstraints(2,6,1,1,CellConstraints.FILL,CellConstraints.FILL));
144
      jpanel1.add(createPanel2(),new CellConstraints(2,4,1,1,CellConstraints.FILL,CellConstraints.FILL));
130
      jpanel1.add(createPanel1(),new CellConstraints(2,4,1,1,CellConstraints.FILL,CellConstraints.FILL));
145 131
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7 });
146 132
      return jpanel1;
147 133
   }
......
149 135
   public JPanel createPanel1()
150 136
   {
151 137
      JPanel jpanel1 = new JPanel();
152
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
153
      CellConstraints cc = new CellConstraints();
154
      jpanel1.setLayout(formlayout1);
155

  
156
      lblName.setName("lblName");
157
      lblName.setText("_name");
158
      lblName.setToolTipText("_name");
159
      jpanel1.add(lblName,cc.xy(1,1));
160

  
161
      txtName.setName("txtName");
162
      txtName.setToolTipText("_name");
163
      jpanel1.add(txtName,cc.xy(3,1));
164

  
165
      lblUrl.setName("lblUrl");
166
      lblUrl.setText("_url");
167
      lblUrl.setToolTipText("_url");
168
      jpanel1.add(lblUrl,cc.xy(1,3));
169

  
170
      lblLevels.setName("lblLevels");
171
      lblLevels.setText("_levels");
172
      lblLevels.setToolTipText("_levels");
173
      jpanel1.add(lblLevels,cc.xy(1,5));
174

  
175
      lblFormat.setName("lblFormat");
176
      lblFormat.setText("_format");
177
      lblFormat.setToolTipText("_format");
178
      jpanel1.add(lblFormat,cc.xy(1,7));
179

  
180
      lblApiKey.setName("lblApiKey");
181
      lblApiKey.setText("_apikey");
182
      lblApiKey.setToolTipText("_apikey");
183
      jpanel1.add(lblApiKey,cc.xy(1,9));
184

  
185
      txtUrl.setName("txtUrl");
186
      txtUrl.setToolTipText("_url");
187
      jpanel1.add(txtUrl,cc.xy(3,3));
188

  
189
      txtFormat.setName("txtFormat");
190
      txtFormat.setToolTipText("_format");
191
      jpanel1.add(txtFormat,cc.xy(3,7));
192

  
193
      txtApiKey.setName("txtApiKey");
194
      txtApiKey.setToolTipText("_api_key");
195
      jpanel1.add(txtApiKey,cc.xy(3,9));
196

  
197
      txtLevels.setName("txtLevels");
198
      txtLevels.setToolTipText("_levels");
199
      jpanel1.add(txtLevels,cc.xy(3,5));
200

  
201
      addFillComponents(jpanel1,new int[]{ 2 },new int[]{ 2,4,6,8 });
202
      return jpanel1;
203
   }
204

  
205
   public JPanel createPanel2()
206
   {
207
      JPanel jpanel1 = new JPanel();
208 138
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
209 139
      CellConstraints cc = new CellConstraints();
210 140
      jpanel1.setLayout(formlayout1);
211 141

  
212
      btnUpdate.setActionCommand("_update_server");
213
      btnUpdate.setName("btnUpdate");
214
      btnUpdate.setText("_update_server");
215
      btnUpdate.setToolTipText("_update_server");
216
      jpanel1.add(btnUpdate,cc.xy(1,1));
142
      btnEdit.setActionCommand("_update_server");
143
      btnEdit.setName("btnEdit");
144
      btnEdit.setText("_edit_server");
145
      btnEdit.setToolTipText("_edit_server");
146
      jpanel1.add(btnEdit,cc.xy(1,1));
217 147

  
218 148
      btnAdd.setActionCommand("JButton");
219 149
      btnAdd.setName("btnAdd");

Also available in: Unified diff