svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.swing / org.gvsig.fmap.dal.swing.impl / src / main / java / org / gvsig / fmap / dal / swing / impl / featuretype / DefaultFeatureTypePanelView.java @ 47658
History | View | Annotate | Download (30.1 KB)
1 |
package org.gvsig.fmap.dal.swing.impl.featuretype; |
---|---|
2 |
|
3 |
import com.jeta.forms.components.line.HorizontalLineComponent; |
4 |
import com.jeta.forms.components.separator.TitledSeparator; |
5 |
import com.jeta.open.i18n.I18NUtils; |
6 |
import com.jgoodies.forms.layout.CellConstraints; |
7 |
import com.jgoodies.forms.layout.FormLayout; |
8 |
import java.awt.BorderLayout; |
9 |
import java.awt.ComponentOrientation; |
10 |
import java.awt.Container; |
11 |
import java.awt.Dimension; |
12 |
import javax.swing.Box; |
13 |
import javax.swing.ImageIcon; |
14 |
import javax.swing.JButton; |
15 |
import javax.swing.JCheckBox; |
16 |
import javax.swing.JComboBox; |
17 |
import javax.swing.JFrame; |
18 |
import javax.swing.JLabel; |
19 |
import javax.swing.JPanel; |
20 |
import javax.swing.JScrollPane; |
21 |
import javax.swing.JTabbedPane; |
22 |
import javax.swing.JTable; |
23 |
import javax.swing.JTextArea; |
24 |
import javax.swing.JTextField; |
25 |
import javax.swing.border.EmptyBorder; |
26 |
|
27 |
|
28 |
public class DefaultFeatureTypePanelView extends JPanel |
29 |
{ |
30 |
JTabbedPane tabFeatureType = new JTabbedPane(); |
31 |
JLabel lblLabel = new JLabel(); |
32 |
JLabel lblDescription = new JLabel(); |
33 |
JTextField txtLabel = new JTextField(); |
34 |
JTextArea txtDescription = new JTextArea(); |
35 |
JLabel lblTags = new JLabel(); |
36 |
JPanel gridTags = new JPanel(); |
37 |
HorizontalLineComponent horizontallinecomponent1 = new HorizontalLineComponent();
|
38 |
JPanel gridTagsItems = new JPanel(); |
39 |
JTable tblTagsItems = new JTable(); |
40 |
JButton btnTagsNew = new JButton(); |
41 |
JButton btnTagsDelete = new JButton(); |
42 |
JPanel gridTagsItem = new JPanel(); |
43 |
JButton btnTagsAccept = new JButton(); |
44 |
JButton btnTagsDiscard = new JButton(); |
45 |
JButton btnTagsModify = new JButton(); |
46 |
JPanel grdTagsItemView = new JPanel(); |
47 |
JLabel lblTagsItemName = new JLabel(); |
48 |
JLabel lblTagsItemValue = new JLabel(); |
49 |
JComboBox cboTagsItemName = new JComboBox(); |
50 |
JComboBox cboTagsItemValue = new JComboBox(); |
51 |
JLabel lblTagsItemNotes = new JLabel(); |
52 |
JLabel lblTagsItemNotesValue = new JLabel(); |
53 |
JLabel lblDefaultGeometry = new JLabel(); |
54 |
JComboBox cboDefaultGeometry = new JComboBox(); |
55 |
JPanel gridAttributes = new JPanel(); |
56 |
HorizontalLineComponent horizontallinecomponent2 = new HorizontalLineComponent();
|
57 |
JPanel gridAttributesTable = new JPanel(); |
58 |
JTable tblFields = new JTable(); |
59 |
JButton btnNew = new JButton(); |
60 |
JButton btnDelete = new JButton(); |
61 |
JPanel gridAttributesDetail = new JPanel(); |
62 |
JPanel pnlField = new JPanel(); |
63 |
JButton btnFormFieldAccept = new JButton(); |
64 |
JButton btnFormFieldDiscard = new JButton(); |
65 |
JButton btnFormFieldModify = new JButton(); |
66 |
JCheckBox chkRulesValidateFeatureBeforeInsert = new JCheckBox(); |
67 |
JCheckBox chkRulesValidateFeaturesAtFinishEditing = new JCheckBox(); |
68 |
TitledSeparator lblRulesDefaultRules = new TitledSeparator();
|
69 |
TitledSeparator lblRulesCustomRules = new TitledSeparator();
|
70 |
JPanel gridRules = new JPanel(); |
71 |
JPanel gridRulesTable = new JPanel(); |
72 |
JTable tblRules = new JTable(); |
73 |
JButton btnRulesNew = new JButton(); |
74 |
JButton btnRulesDelete = new JButton(); |
75 |
JPanel gridRulesDetail = new JPanel(); |
76 |
JLabel lblRuleName = new JLabel(); |
77 |
JLabel lblRuleDescription = new JLabel(); |
78 |
JLabel lblRuleCheckAtFinishEditing = new JLabel(); |
79 |
JLabel lblRuleValidation = new JLabel(); |
80 |
JTextField txtRuleName = new JTextField(); |
81 |
JCheckBox chkRuleCheckAtFinishEditing = new JCheckBox(); |
82 |
JTextArea txtRuleValidation = new JTextArea(); |
83 |
JButton btnRuleValidation = new JButton(); |
84 |
JButton btnRuleValidationHistory = new JButton(); |
85 |
JButton btnRuleValidationBookmarks = new JButton(); |
86 |
JTextArea txtRuleDescription = new JTextArea(); |
87 |
JLabel lblRuleCheckAtUpdate = new JLabel(); |
88 |
JCheckBox chkRuleCheckAtUpdate = new JCheckBox(); |
89 |
JLabel lblRuleCheckAtEditFeature = new JLabel(); |
90 |
JCheckBox chkRuleCheckAtEditFeature = new JCheckBox(); |
91 |
JButton btnRuleFormFieldAccept = new JButton(); |
92 |
JButton btnRuleFormFieldDiscard = new JButton(); |
93 |
JButton btnRuleFormFieldModify = new JButton(); |
94 |
JPanel pnlCfgActions = new JPanel(); |
95 |
|
96 |
/**
|
97 |
* Default constructor
|
98 |
*/
|
99 |
public DefaultFeatureTypePanelView()
|
100 |
{ |
101 |
initializePanel(); |
102 |
} |
103 |
|
104 |
/**
|
105 |
* Adds fill components to empty cells in the first row and first column of the grid.
|
106 |
* This ensures that the grid spacing will be the same as shown in the designer.
|
107 |
* @param cols an array of column indices in the first row where fill components should be added.
|
108 |
* @param rows an array of row indices in the first column where fill components should be added.
|
109 |
*/
|
110 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
111 |
{ |
112 |
Dimension filler = new Dimension(10,10); |
113 |
|
114 |
boolean filled_cell_11 = false; |
115 |
CellConstraints cc = new CellConstraints();
|
116 |
if ( cols.length > 0 && rows.length > 0 ) |
117 |
{ |
118 |
if ( cols[0] == 1 && rows[0] == 1 ) |
119 |
{ |
120 |
/** add a rigid area */
|
121 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
122 |
filled_cell_11 = true;
|
123 |
} |
124 |
} |
125 |
|
126 |
for( int index = 0; index < cols.length; index++ ) |
127 |
{ |
128 |
if ( cols[index] == 1 && filled_cell_11 ) |
129 |
{ |
130 |
continue;
|
131 |
} |
132 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
133 |
} |
134 |
|
135 |
for( int index = 0; index < rows.length; index++ ) |
136 |
{ |
137 |
if ( rows[index] == 1 && filled_cell_11 ) |
138 |
{ |
139 |
continue;
|
140 |
} |
141 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
142 |
} |
143 |
|
144 |
} |
145 |
|
146 |
/**
|
147 |
* Helper method to load an image file from the CLASSPATH
|
148 |
* @param imageName the package and name of the file to load relative to the CLASSPATH
|
149 |
* @return an ImageIcon instance with the specified image file
|
150 |
* @throws IllegalArgumentException if the image resource cannot be loaded.
|
151 |
*/
|
152 |
public ImageIcon loadImage( String imageName ) |
153 |
{ |
154 |
try
|
155 |
{ |
156 |
ClassLoader classloader = getClass().getClassLoader();
|
157 |
java.net.URL url = classloader.getResource( imageName ); |
158 |
if ( url != null ) |
159 |
{ |
160 |
ImageIcon icon = new ImageIcon( url ); |
161 |
return icon;
|
162 |
} |
163 |
} |
164 |
catch( Exception e ) |
165 |
{ |
166 |
e.printStackTrace(); |
167 |
} |
168 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
169 |
} |
170 |
|
171 |
/**
|
172 |
* Method for recalculating the component orientation for
|
173 |
* right-to-left Locales.
|
174 |
* @param orientation the component orientation to be applied
|
175 |
*/
|
176 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
177 |
{ |
178 |
// Not yet implemented...
|
179 |
// I18NUtils.applyComponentOrientation(this, orientation);
|
180 |
super.applyComponentOrientation(orientation);
|
181 |
} |
182 |
|
183 |
public JPanel createPanel() |
184 |
{ |
185 |
JPanel jpanel1 = new JPanel(); |
186 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
187 |
CellConstraints cc = new CellConstraints();
|
188 |
jpanel1.setLayout(formlayout1); |
189 |
|
190 |
tabFeatureType.setName("tabFeatureType");
|
191 |
tabFeatureType.addTab("_General",null,createPanel1()); |
192 |
tabFeatureType.addTab("_Columns",null,createPanel4()); |
193 |
tabFeatureType.addTab("_Rules",null,createPanel7()); |
194 |
jpanel1.add(tabFeatureType,cc.xy(2,3)); |
195 |
|
196 |
jpanel1.add(createPanel13(),cc.xy(2,2)); |
197 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4 }); |
198 |
return jpanel1;
|
199 |
} |
200 |
|
201 |
public JPanel createPanel1() |
202 |
{ |
203 |
JPanel jpanel1 = new JPanel(); |
204 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:12DLU:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(0.1),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(0.8),CENTER:2DLU:NONE"); |
205 |
CellConstraints cc = new CellConstraints();
|
206 |
jpanel1.setLayout(formlayout1); |
207 |
|
208 |
lblLabel.setName("lblLabel");
|
209 |
lblLabel.setText("_Label");
|
210 |
jpanel1.add(lblLabel,cc.xy(2,2)); |
211 |
|
212 |
lblDescription.setName("lblDescription");
|
213 |
lblDescription.setText("_Description");
|
214 |
lblDescription.setVerticalAlignment(JLabel.TOP);
|
215 |
jpanel1.add(lblDescription,new CellConstraints(2,4,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
216 |
|
217 |
txtLabel.setName("txtLabel");
|
218 |
jpanel1.add(txtLabel,cc.xy(4,2)); |
219 |
|
220 |
txtDescription.setName("txtDescription");
|
221 |
JScrollPane jscrollpane1 = new JScrollPane(); |
222 |
jscrollpane1.setViewportView(txtDescription); |
223 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
224 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
225 |
jpanel1.add(jscrollpane1,new CellConstraints(4,4,1,1,CellConstraints.DEFAULT,CellConstraints.FILL)); |
226 |
|
227 |
lblTags.setName("lblTags");
|
228 |
lblTags.setText("_Tags");
|
229 |
lblTags.setVerticalAlignment(JLabel.TOP);
|
230 |
jpanel1.add(lblTags,cc.xy(2,8)); |
231 |
|
232 |
jpanel1.add(creategridTags(),cc.xy(4,8)); |
233 |
lblDefaultGeometry.setName("lblDefaultGeometry");
|
234 |
lblDefaultGeometry.setText("_Default_geometry");
|
235 |
lblDefaultGeometry.setVerticalAlignment(JLabel.TOP);
|
236 |
jpanel1.add(lblDefaultGeometry,cc.xy(2,6)); |
237 |
|
238 |
cboDefaultGeometry.setName("cboDefaultGeometry");
|
239 |
jpanel1.add(cboDefaultGeometry,cc.xy(4,6)); |
240 |
|
241 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9 }); |
242 |
return jpanel1;
|
243 |
} |
244 |
|
245 |
public JPanel creategridTags() |
246 |
{ |
247 |
gridTags.setName("gridTags");
|
248 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); |
249 |
CellConstraints cc = new CellConstraints();
|
250 |
gridTags.setLayout(formlayout1); |
251 |
|
252 |
gridTags.add(horizontallinecomponent1,cc.xy(1,2)); |
253 |
|
254 |
gridTags.add(creategridTagsItems(),cc.xy(1,1)); |
255 |
gridTags.add(creategridTagsItem(),cc.xy(1,3)); |
256 |
addFillComponents(gridTags,new int[]{ 1 },new int[]{ 1,3 }); |
257 |
return gridTags;
|
258 |
} |
259 |
|
260 |
public JPanel creategridTagsItems() |
261 |
{ |
262 |
gridTagsItems.setName("gridTagsItems");
|
263 |
FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)"); |
264 |
CellConstraints cc = new CellConstraints();
|
265 |
gridTagsItems.setLayout(formlayout1); |
266 |
|
267 |
tblTagsItems.setName("tblTagsItems");
|
268 |
JScrollPane jscrollpane1 = new JScrollPane(); |
269 |
jscrollpane1.setViewportView(tblTagsItems); |
270 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
271 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
272 |
gridTagsItems.add(jscrollpane1,cc.xy(1,1)); |
273 |
|
274 |
gridTagsItems.add(createPanel2(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
275 |
addFillComponents(gridTagsItems,new int[]{ 2,3 },new int[0]); |
276 |
return gridTagsItems;
|
277 |
} |
278 |
|
279 |
public JPanel createPanel2() |
280 |
{ |
281 |
JPanel jpanel1 = new JPanel(); |
282 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:NONE"); |
283 |
CellConstraints cc = new CellConstraints();
|
284 |
jpanel1.setLayout(formlayout1); |
285 |
|
286 |
btnTagsNew.setActionCommand("_New");
|
287 |
btnTagsNew.setName("btnTagsNew");
|
288 |
btnTagsNew.setText("_New");
|
289 |
jpanel1.add(btnTagsNew,cc.xy(2,1)); |
290 |
|
291 |
btnTagsDelete.setActionCommand("_Delete");
|
292 |
btnTagsDelete.setName("btnTagsDelete");
|
293 |
btnTagsDelete.setText("_Delete");
|
294 |
jpanel1.add(btnTagsDelete,cc.xy(2,3)); |
295 |
|
296 |
addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 }); |
297 |
return jpanel1;
|
298 |
} |
299 |
|
300 |
public JPanel creategridTagsItem() |
301 |
{ |
302 |
gridTagsItem.setName("gridTagsItem");
|
303 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)"); |
304 |
CellConstraints cc = new CellConstraints();
|
305 |
gridTagsItem.setLayout(formlayout1); |
306 |
|
307 |
gridTagsItem.add(createPanel3(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
308 |
gridTagsItem.add(creategrdTagsItemView(),cc.xy(1,1)); |
309 |
addFillComponents(gridTagsItem,new int[]{ 1,2,3 },new int[]{ 1 }); |
310 |
return gridTagsItem;
|
311 |
} |
312 |
|
313 |
public JPanel createPanel3() |
314 |
{ |
315 |
JPanel jpanel1 = new JPanel(); |
316 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); |
317 |
CellConstraints cc = new CellConstraints();
|
318 |
jpanel1.setLayout(formlayout1); |
319 |
|
320 |
btnTagsAccept.setActionCommand("JButton");
|
321 |
btnTagsAccept.setName("btnTagsAccept");
|
322 |
btnTagsAccept.setText("Accept");
|
323 |
jpanel1.add(btnTagsAccept,cc.xy(2,3)); |
324 |
|
325 |
btnTagsDiscard.setActionCommand("JButton");
|
326 |
btnTagsDiscard.setName("btnTagsDiscard");
|
327 |
btnTagsDiscard.setText("_Discard");
|
328 |
jpanel1.add(btnTagsDiscard,cc.xy(2,5)); |
329 |
|
330 |
btnTagsModify.setActionCommand("JButton");
|
331 |
btnTagsModify.setName("btnTagsModify");
|
332 |
btnTagsModify.setText("_Modify");
|
333 |
jpanel1.add(btnTagsModify,cc.xy(2,1)); |
334 |
|
335 |
addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 }); |
336 |
return jpanel1;
|
337 |
} |
338 |
|
339 |
public JPanel creategrdTagsItemView() |
340 |
{ |
341 |
grdTagsItemView.setName("grdTagsItemView");
|
342 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:12DLU:GROW(1.0)","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); |
343 |
CellConstraints cc = new CellConstraints();
|
344 |
grdTagsItemView.setLayout(formlayout1); |
345 |
|
346 |
lblTagsItemName.setName("lblTagsItemName");
|
347 |
lblTagsItemName.setText("_Name");
|
348 |
grdTagsItemView.add(lblTagsItemName,cc.xy(1,1)); |
349 |
|
350 |
lblTagsItemValue.setName("lblTagsItemValue");
|
351 |
lblTagsItemValue.setText("_Value");
|
352 |
grdTagsItemView.add(lblTagsItemValue,cc.xy(1,3)); |
353 |
|
354 |
cboTagsItemName.setEditable(true);
|
355 |
cboTagsItemName.setName("cboTagsItemName");
|
356 |
cboTagsItemName.setRequestFocusEnabled(false);
|
357 |
grdTagsItemView.add(cboTagsItemName,cc.xy(3,1)); |
358 |
|
359 |
cboTagsItemValue.setEditable(true);
|
360 |
cboTagsItemValue.setName("cboTagsItemValue");
|
361 |
cboTagsItemValue.setRequestFocusEnabled(false);
|
362 |
grdTagsItemView.add(cboTagsItemValue,cc.xy(3,3)); |
363 |
|
364 |
lblTagsItemNotes.setName("lblTagsItemNotes");
|
365 |
lblTagsItemNotes.setText("_Notes");
|
366 |
grdTagsItemView.add(lblTagsItemNotes,new CellConstraints(1,5,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
367 |
|
368 |
lblTagsItemNotesValue.setName("lblTagsItemNotesValue");
|
369 |
grdTagsItemView.add(lblTagsItemNotesValue,cc.xy(3,5)); |
370 |
|
371 |
addFillComponents(grdTagsItemView,new int[]{ 2 },new int[]{ 2,4 }); |
372 |
return grdTagsItemView;
|
373 |
} |
374 |
|
375 |
public JPanel createPanel4() |
376 |
{ |
377 |
JPanel jpanel1 = new JPanel(); |
378 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
379 |
CellConstraints cc = new CellConstraints();
|
380 |
jpanel1.setLayout(formlayout1); |
381 |
|
382 |
jpanel1.add(creategridAttributes(),cc.xy(2,2)); |
383 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 }); |
384 |
return jpanel1;
|
385 |
} |
386 |
|
387 |
public JPanel creategridAttributes() |
388 |
{ |
389 |
gridAttributes.setName("gridAttributes");
|
390 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0)"); |
391 |
CellConstraints cc = new CellConstraints();
|
392 |
gridAttributes.setLayout(formlayout1); |
393 |
|
394 |
gridAttributes.add(horizontallinecomponent2,cc.xy(1,2)); |
395 |
|
396 |
gridAttributes.add(creategridAttributesTable(),cc.xy(1,1)); |
397 |
gridAttributes.add(creategridAttributesDetail(),cc.xy(1,3)); |
398 |
addFillComponents(gridAttributes,new int[]{ 1 },new int[]{ 1,3 }); |
399 |
return gridAttributes;
|
400 |
} |
401 |
|
402 |
public JPanel creategridAttributesTable() |
403 |
{ |
404 |
gridAttributesTable.setName("gridAttributesTable");
|
405 |
FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)"); |
406 |
CellConstraints cc = new CellConstraints();
|
407 |
gridAttributesTable.setLayout(formlayout1); |
408 |
|
409 |
tblFields.setName("tblFields");
|
410 |
JScrollPane jscrollpane1 = new JScrollPane(); |
411 |
jscrollpane1.setViewportView(tblFields); |
412 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
413 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
414 |
gridAttributesTable.add(jscrollpane1,cc.xy(1,1)); |
415 |
|
416 |
gridAttributesTable.add(createPanel5(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
417 |
addFillComponents(gridAttributesTable,new int[]{ 2,3 },new int[0]); |
418 |
return gridAttributesTable;
|
419 |
} |
420 |
|
421 |
public JPanel createPanel5() |
422 |
{ |
423 |
JPanel jpanel1 = new JPanel(); |
424 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0)"); |
425 |
CellConstraints cc = new CellConstraints();
|
426 |
jpanel1.setLayout(formlayout1); |
427 |
|
428 |
btnNew.setActionCommand("_New");
|
429 |
btnNew.setName("btnNew");
|
430 |
btnNew.setText("_New");
|
431 |
jpanel1.add(btnNew,cc.xy(2,1)); |
432 |
|
433 |
btnDelete.setActionCommand("_Delete");
|
434 |
btnDelete.setName("btnDelete");
|
435 |
btnDelete.setText("_Delete");
|
436 |
jpanel1.add(btnDelete,cc.xy(2,3)); |
437 |
|
438 |
addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 }); |
439 |
return jpanel1;
|
440 |
} |
441 |
|
442 |
public JPanel creategridAttributesDetail() |
443 |
{ |
444 |
gridAttributesDetail.setName("gridAttributesDetail");
|
445 |
FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)"); |
446 |
CellConstraints cc = new CellConstraints();
|
447 |
gridAttributesDetail.setLayout(formlayout1); |
448 |
|
449 |
pnlField.setName("pnlField");
|
450 |
gridAttributesDetail.add(pnlField,cc.xy(1,1)); |
451 |
|
452 |
gridAttributesDetail.add(createPanel6(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
453 |
addFillComponents(gridAttributesDetail,new int[]{ 2,3 },new int[0]); |
454 |
return gridAttributesDetail;
|
455 |
} |
456 |
|
457 |
public JPanel createPanel6() |
458 |
{ |
459 |
JPanel jpanel1 = new JPanel(); |
460 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); |
461 |
CellConstraints cc = new CellConstraints();
|
462 |
jpanel1.setLayout(formlayout1); |
463 |
|
464 |
btnFormFieldAccept.setActionCommand("JButton");
|
465 |
btnFormFieldAccept.setName("btnFormFieldAccept");
|
466 |
btnFormFieldAccept.setText("Accept");
|
467 |
jpanel1.add(btnFormFieldAccept,cc.xy(2,3)); |
468 |
|
469 |
btnFormFieldDiscard.setActionCommand("JButton");
|
470 |
btnFormFieldDiscard.setName("btnFormFieldDiscard");
|
471 |
btnFormFieldDiscard.setText("_Discard");
|
472 |
jpanel1.add(btnFormFieldDiscard,cc.xy(2,5)); |
473 |
|
474 |
btnFormFieldModify.setActionCommand("JButton");
|
475 |
btnFormFieldModify.setName("btnFormFieldModify");
|
476 |
btnFormFieldModify.setText("_Modify");
|
477 |
jpanel1.add(btnFormFieldModify,cc.xy(2,1)); |
478 |
|
479 |
addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 }); |
480 |
return jpanel1;
|
481 |
} |
482 |
|
483 |
public JPanel createPanel7() |
484 |
{ |
485 |
JPanel jpanel1 = new JPanel(); |
486 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
487 |
CellConstraints cc = new CellConstraints();
|
488 |
jpanel1.setLayout(formlayout1); |
489 |
|
490 |
chkRulesValidateFeatureBeforeInsert.setActionCommand("_Validate_features_before_insert");
|
491 |
chkRulesValidateFeatureBeforeInsert.setName("chkRulesValidateFeatureBeforeInsert");
|
492 |
chkRulesValidateFeatureBeforeInsert.setText("_Validate_features_before_insert");
|
493 |
jpanel1.add(chkRulesValidateFeatureBeforeInsert,cc.xy(2,4)); |
494 |
|
495 |
chkRulesValidateFeaturesAtFinishEditing.setActionCommand("_Validate_features_at_finish_editing");
|
496 |
chkRulesValidateFeaturesAtFinishEditing.setName("chkRulesValidateFeaturesAtFinishEditing");
|
497 |
chkRulesValidateFeaturesAtFinishEditing.setText("_Validate_features_at_finish_editing");
|
498 |
jpanel1.add(chkRulesValidateFeaturesAtFinishEditing,cc.xy(2,6)); |
499 |
|
500 |
lblRulesDefaultRules.setName("lblRulesDefaultRules");
|
501 |
lblRulesDefaultRules.setText("_Default_rules");
|
502 |
jpanel1.add(lblRulesDefaultRules,cc.xywh(2,2,3,1)); |
503 |
|
504 |
lblRulesCustomRules.setName("lblRulesCustomRules");
|
505 |
lblRulesCustomRules.setText("_Custom_rules");
|
506 |
jpanel1.add(lblRulesCustomRules,cc.xywh(2,7,3,1)); |
507 |
|
508 |
jpanel1.add(creategridRules(),cc.xywh(2,9,3,1)); |
509 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10 }); |
510 |
return jpanel1;
|
511 |
} |
512 |
|
513 |
public JPanel creategridRules() |
514 |
{ |
515 |
gridRules.setName("gridRules");
|
516 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:GROW(1.0)"); |
517 |
CellConstraints cc = new CellConstraints();
|
518 |
gridRules.setLayout(formlayout1); |
519 |
|
520 |
gridRules.add(creategridRulesTable(),cc.xy(1,1)); |
521 |
gridRules.add(creategridRulesDetail(),cc.xy(1,2)); |
522 |
addFillComponents(gridRules,new int[]{ 1 },new int[]{ 1,2 }); |
523 |
return gridRules;
|
524 |
} |
525 |
|
526 |
public JPanel creategridRulesTable() |
527 |
{ |
528 |
gridRulesTable.setName("gridRulesTable");
|
529 |
FormLayout formlayout1 = new FormLayout("FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)"); |
530 |
CellConstraints cc = new CellConstraints();
|
531 |
gridRulesTable.setLayout(formlayout1); |
532 |
|
533 |
tblRules.setName("tblRules");
|
534 |
JScrollPane jscrollpane1 = new JScrollPane(); |
535 |
jscrollpane1.setViewportView(tblRules); |
536 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
537 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
538 |
gridRulesTable.add(jscrollpane1,cc.xy(1,1)); |
539 |
|
540 |
gridRulesTable.add(createPanel8(),cc.xy(3,1)); |
541 |
addFillComponents(gridRulesTable,new int[]{ 2,3 },new int[0]); |
542 |
return gridRulesTable;
|
543 |
} |
544 |
|
545 |
public JPanel createPanel8() |
546 |
{ |
547 |
JPanel jpanel1 = new JPanel(); |
548 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0)"); |
549 |
CellConstraints cc = new CellConstraints();
|
550 |
jpanel1.setLayout(formlayout1); |
551 |
|
552 |
btnRulesNew.setActionCommand("_New");
|
553 |
btnRulesNew.setName("btnRulesNew");
|
554 |
btnRulesNew.setText("_New");
|
555 |
jpanel1.add(btnRulesNew,cc.xy(2,1)); |
556 |
|
557 |
btnRulesDelete.setActionCommand("_Delete");
|
558 |
btnRulesDelete.setName("btnRulesDelete");
|
559 |
btnRulesDelete.setText("_Delete");
|
560 |
jpanel1.add(btnRulesDelete,cc.xy(2,3)); |
561 |
|
562 |
addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5 }); |
563 |
return jpanel1;
|
564 |
} |
565 |
|
566 |
public JPanel creategridRulesDetail() |
567 |
{ |
568 |
gridRulesDetail.setName("gridRulesDetail");
|
569 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)"); |
570 |
CellConstraints cc = new CellConstraints();
|
571 |
gridRulesDetail.setLayout(formlayout1); |
572 |
|
573 |
gridRulesDetail.add(createPanel9(),cc.xy(1,1)); |
574 |
gridRulesDetail.add(createPanel12(),cc.xy(3,1)); |
575 |
addFillComponents(gridRulesDetail,new int[]{ 1,2,3 },new int[]{ 1 }); |
576 |
return gridRulesDetail;
|
577 |
} |
578 |
|
579 |
public JPanel createPanel9() |
580 |
{ |
581 |
JPanel jpanel1 = new JPanel(); |
582 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:12DLU:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(0.2),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0)"); |
583 |
CellConstraints cc = new CellConstraints();
|
584 |
jpanel1.setLayout(formlayout1); |
585 |
|
586 |
lblRuleName.setName("lblRuleName");
|
587 |
lblRuleName.setText("_Name");
|
588 |
jpanel1.add(lblRuleName,cc.xy(1,1)); |
589 |
|
590 |
lblRuleDescription.setName("lblRuleDescription");
|
591 |
lblRuleDescription.setText("_Description");
|
592 |
jpanel1.add(lblRuleDescription,new CellConstraints(1,3,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
593 |
|
594 |
lblRuleCheckAtFinishEditing.setName("lblRuleCheckAtFinishEditing");
|
595 |
lblRuleCheckAtFinishEditing.setText("_Check_at_finish_editing");
|
596 |
jpanel1.add(lblRuleCheckAtFinishEditing,cc.xy(1,5)); |
597 |
|
598 |
lblRuleValidation.setName("lblRuleValidation");
|
599 |
lblRuleValidation.setText("_Validation");
|
600 |
jpanel1.add(lblRuleValidation,new CellConstraints(1,11,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
601 |
|
602 |
txtRuleName.setName("txtRuleName");
|
603 |
jpanel1.add(txtRuleName,cc.xy(3,1)); |
604 |
|
605 |
chkRuleCheckAtFinishEditing.setName("chkRuleCheckAtFinishEditing");
|
606 |
jpanel1.add(chkRuleCheckAtFinishEditing,cc.xy(3,5)); |
607 |
|
608 |
jpanel1.add(createPanel10(),cc.xy(3,11)); |
609 |
txtRuleDescription.setName("txtRuleDescription");
|
610 |
JScrollPane jscrollpane1 = new JScrollPane(); |
611 |
jscrollpane1.setViewportView(txtRuleDescription); |
612 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
613 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
614 |
jpanel1.add(jscrollpane1,new CellConstraints(3,3,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
615 |
|
616 |
lblRuleCheckAtUpdate.setName("lblRuleCheckAtUpdate");
|
617 |
lblRuleCheckAtUpdate.setText("_Check_at_insert_or_update_feature");
|
618 |
jpanel1.add(lblRuleCheckAtUpdate,cc.xy(1,7)); |
619 |
|
620 |
chkRuleCheckAtUpdate.setName("chkRuleCheckAtUpdate");
|
621 |
jpanel1.add(chkRuleCheckAtUpdate,cc.xy(3,7)); |
622 |
|
623 |
lblRuleCheckAtEditFeature.setName("lblRuleCheckAtEditFeature");
|
624 |
lblRuleCheckAtEditFeature.setText("_Check_at_edit_feature");
|
625 |
jpanel1.add(lblRuleCheckAtEditFeature,cc.xy(1,9)); |
626 |
|
627 |
chkRuleCheckAtEditFeature.setName("chkRuleCheckAtEditFeature");
|
628 |
jpanel1.add(chkRuleCheckAtEditFeature,cc.xy(3,9)); |
629 |
|
630 |
addFillComponents(jpanel1,new int[]{ 2,4 },new int[]{ 2,4,6,8,10 }); |
631 |
return jpanel1;
|
632 |
} |
633 |
|
634 |
public JPanel createPanel10() |
635 |
{ |
636 |
JPanel jpanel1 = new JPanel(); |
637 |
FormLayout formlayout1 = new FormLayout("FILL:200PX:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)"); |
638 |
CellConstraints cc = new CellConstraints();
|
639 |
jpanel1.setLayout(formlayout1); |
640 |
|
641 |
txtRuleValidation.setName("txtRuleValidation");
|
642 |
JScrollPane jscrollpane1 = new JScrollPane(); |
643 |
jscrollpane1.setViewportView(txtRuleValidation); |
644 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
645 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
646 |
jpanel1.add(jscrollpane1,cc.xy(1,1)); |
647 |
|
648 |
jpanel1.add(createPanel11(),new CellConstraints(3,1,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
649 |
addFillComponents(jpanel1,new int[]{ 2,3 },new int[0]); |
650 |
return jpanel1;
|
651 |
} |
652 |
|
653 |
public JPanel createPanel11() |
654 |
{ |
655 |
JPanel jpanel1 = new JPanel(); |
656 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); |
657 |
CellConstraints cc = new CellConstraints();
|
658 |
jpanel1.setLayout(formlayout1); |
659 |
|
660 |
btnRuleValidation.setActionCommand("...");
|
661 |
btnRuleValidation.setName("btnRuleValidation");
|
662 |
btnRuleValidation.setOpaque(false);
|
663 |
btnRuleValidation.setText("...");
|
664 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
665 |
btnRuleValidation.setBorder(emptyborder1); |
666 |
jpanel1.add(btnRuleValidation,cc.xy(1,1)); |
667 |
|
668 |
btnRuleValidationHistory.setActionCommand("...");
|
669 |
btnRuleValidationHistory.setName("btnRuleValidationHistory");
|
670 |
btnRuleValidationHistory.setOpaque(false);
|
671 |
btnRuleValidationHistory.setText("...");
|
672 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
673 |
btnRuleValidationHistory.setBorder(emptyborder2); |
674 |
jpanel1.add(btnRuleValidationHistory,cc.xy(1,3)); |
675 |
|
676 |
btnRuleValidationBookmarks.setActionCommand("...");
|
677 |
btnRuleValidationBookmarks.setName("btnRuleValidationBookmarks");
|
678 |
btnRuleValidationBookmarks.setOpaque(false);
|
679 |
btnRuleValidationBookmarks.setText("...");
|
680 |
EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2); |
681 |
btnRuleValidationBookmarks.setBorder(emptyborder3); |
682 |
jpanel1.add(btnRuleValidationBookmarks,cc.xy(1,5)); |
683 |
|
684 |
addFillComponents(jpanel1,new int[0],new int[]{ 2,4 }); |
685 |
return jpanel1;
|
686 |
} |
687 |
|
688 |
public JPanel createPanel12() |
689 |
{ |
690 |
JPanel jpanel1 = new JPanel(); |
691 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,FILL:2DLU:GROW(1.0)"); |
692 |
CellConstraints cc = new CellConstraints();
|
693 |
jpanel1.setLayout(formlayout1); |
694 |
|
695 |
btnRuleFormFieldAccept.setActionCommand("JButton");
|
696 |
btnRuleFormFieldAccept.setName("btnRuleFormFieldAccept");
|
697 |
btnRuleFormFieldAccept.setText("Accept");
|
698 |
jpanel1.add(btnRuleFormFieldAccept,cc.xy(2,3)); |
699 |
|
700 |
btnRuleFormFieldDiscard.setActionCommand("JButton");
|
701 |
btnRuleFormFieldDiscard.setName("btnRuleFormFieldDiscard");
|
702 |
btnRuleFormFieldDiscard.setText("_Discard");
|
703 |
jpanel1.add(btnRuleFormFieldDiscard,cc.xy(2,5)); |
704 |
|
705 |
btnRuleFormFieldModify.setActionCommand("JButton");
|
706 |
btnRuleFormFieldModify.setName("btnRuleFormFieldModify");
|
707 |
btnRuleFormFieldModify.setText("_Modify");
|
708 |
jpanel1.add(btnRuleFormFieldModify,cc.xy(2,1)); |
709 |
|
710 |
addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1,2,3,4,5,6 }); |
711 |
return jpanel1;
|
712 |
} |
713 |
|
714 |
public JPanel createPanel13() |
715 |
{ |
716 |
JPanel jpanel1 = new JPanel(); |
717 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
718 |
CellConstraints cc = new CellConstraints();
|
719 |
jpanel1.setLayout(formlayout1); |
720 |
|
721 |
pnlCfgActions.setName("pnlCfgActions");
|
722 |
pnlCfgActions.setOpaque(false);
|
723 |
jpanel1.add(pnlCfgActions,cc.xy(2,1)); |
724 |
|
725 |
addFillComponents(jpanel1,new int[]{ 1 },new int[]{ 1 }); |
726 |
return jpanel1;
|
727 |
} |
728 |
|
729 |
/**
|
730 |
* Initializer
|
731 |
*/
|
732 |
protected void initializePanel() |
733 |
{ |
734 |
setLayout(new BorderLayout()); |
735 |
add(createPanel(), BorderLayout.CENTER);
|
736 |
} |
737 |
|
738 |
|
739 |
} |