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