Lines 73-78
Link Here
|
73 |
*/ |
73 |
*/ |
74 |
public class TableCustomizer extends JPanel implements Customizer, FormAwareEditor { |
74 |
public class TableCustomizer extends JPanel implements Customizer, FormAwareEditor { |
75 |
private JTable table; |
75 |
private JTable table; |
|
|
76 |
|
77 |
private static final int ROW_MAX = 100; |
78 |
private static final int COLUMN_MAX = 100; |
76 |
|
79 |
|
77 |
/** Property editor for model from component section. */ |
80 |
/** Property editor for model from component section. */ |
78 |
private RADConnectionPropertyEditor modelFromComponentEd; |
81 |
private RADConnectionPropertyEditor modelFromComponentEd; |
Lines 237-242
Link Here
|
237 |
placeHolder1.setVisible(false); |
240 |
placeHolder1.setVisible(false); |
238 |
placeHolder2 = new javax.swing.JLabel(); |
241 |
placeHolder2 = new javax.swing.JLabel(); |
239 |
placeHolder2.setVisible(false); |
242 |
placeHolder2.setVisible(false); |
|
|
243 |
columnErrorLabel = new javax.swing.JLabel(); |
240 |
rowsTab = new javax.swing.JPanel(); |
244 |
rowsTab = new javax.swing.JPanel(); |
241 |
rowsScrollPane = new javax.swing.JScrollPane(); |
245 |
rowsScrollPane = new javax.swing.JScrollPane(); |
242 |
rowsTable = new javax.swing.JTable(); |
246 |
rowsTable = new javax.swing.JTable(); |
Lines 246-251
Link Here
|
246 |
deleteRowButton = new javax.swing.JButton(); |
250 |
deleteRowButton = new javax.swing.JButton(); |
247 |
moveUpRowButton = new javax.swing.JButton(); |
251 |
moveUpRowButton = new javax.swing.JButton(); |
248 |
moveDownRowButton = new javax.swing.JButton(); |
252 |
moveDownRowButton = new javax.swing.JButton(); |
|
|
253 |
rowErrorLabel = new javax.swing.JLabel(); |
249 |
|
254 |
|
250 |
FormListener formListener = new FormListener(); |
255 |
FormListener formListener = new FormListener(); |
251 |
|
256 |
|
Lines 270-276
Link Here
|
270 |
modelBoundPanel.setLayout(modelBoundPanelLayout); |
275 |
modelBoundPanel.setLayout(modelBoundPanelLayout); |
271 |
modelBoundPanelLayout.setHorizontalGroup( |
276 |
modelBoundPanelLayout.setHorizontalGroup( |
272 |
modelBoundPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
277 |
modelBoundPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
273 |
.add(0, 535, Short.MAX_VALUE) |
278 |
.add(0, 585, Short.MAX_VALUE) |
274 |
); |
279 |
); |
275 |
modelBoundPanelLayout.setVerticalGroup( |
280 |
modelBoundPanelLayout.setVerticalGroup( |
276 |
modelBoundPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
281 |
modelBoundPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
Lines 287-293
Link Here
|
287 |
modelFromComponentPanel.setLayout(modelFromComponentPanelLayout); |
292 |
modelFromComponentPanel.setLayout(modelFromComponentPanelLayout); |
288 |
modelFromComponentPanelLayout.setHorizontalGroup( |
293 |
modelFromComponentPanelLayout.setHorizontalGroup( |
289 |
modelFromComponentPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
294 |
modelFromComponentPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
290 |
.add(0, 535, Short.MAX_VALUE) |
295 |
.add(0, 585, Short.MAX_VALUE) |
291 |
); |
296 |
); |
292 |
modelFromComponentPanelLayout.setVerticalGroup( |
297 |
modelFromComponentPanelLayout.setVerticalGroup( |
293 |
modelFromComponentPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
298 |
modelFromComponentPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
Lines 304-310
Link Here
|
304 |
modelCustomPanel.setLayout(modelCustomPanelLayout); |
309 |
modelCustomPanel.setLayout(modelCustomPanelLayout); |
305 |
modelCustomPanelLayout.setHorizontalGroup( |
310 |
modelCustomPanelLayout.setHorizontalGroup( |
306 |
modelCustomPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
311 |
modelCustomPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
307 |
.add(0, 535, Short.MAX_VALUE) |
312 |
.add(0, 585, Short.MAX_VALUE) |
308 |
); |
313 |
); |
309 |
modelCustomPanelLayout.setVerticalGroup( |
314 |
modelCustomPanelLayout.setVerticalGroup( |
310 |
modelCustomPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
315 |
modelCustomPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
Lines 344-350
Link Here
|
344 |
.add(modelCustomChoice) |
349 |
.add(modelCustomChoice) |
345 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
350 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
346 |
.add(modelCustomPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) |
351 |
.add(modelCustomPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) |
347 |
.addContainerGap(58, Short.MAX_VALUE)) |
352 |
.addContainerGap(63, Short.MAX_VALUE)) |
348 |
); |
353 |
); |
349 |
|
354 |
|
350 |
modelHardcodedChoice.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(TableCustomizer.class, "LBL_TableCustomizer_Model_Hardcoded_ACSD")); // NOI18N |
355 |
modelHardcodedChoice.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(TableCustomizer.class, "LBL_TableCustomizer_Model_Hardcoded_ACSD")); // NOI18N |
Lines 401-407
Link Here
|
401 |
); |
406 |
); |
402 |
columnTitlePanelLayout.setVerticalGroup( |
407 |
columnTitlePanelLayout.setVerticalGroup( |
403 |
columnTitlePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
408 |
columnTitlePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
404 |
.add(0, 24, Short.MAX_VALUE) |
409 |
.add(0, 22, Short.MAX_VALUE) |
405 |
); |
410 |
); |
406 |
|
411 |
|
407 |
columnTypeCombo.setEnabled(false); |
412 |
columnTypeCombo.setEnabled(false); |
Lines 417-423
Link Here
|
417 |
); |
422 |
); |
418 |
columnEditorPanelLayout.setVerticalGroup( |
423 |
columnEditorPanelLayout.setVerticalGroup( |
419 |
columnEditorPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
424 |
columnEditorPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
420 |
.add(0, 24, Short.MAX_VALUE) |
425 |
.add(0, 22, Short.MAX_VALUE) |
421 |
); |
426 |
); |
422 |
|
427 |
|
423 |
columnRendererPanel.setEnabled(false); |
428 |
columnRendererPanel.setEnabled(false); |
Lines 430-436
Link Here
|
430 |
); |
435 |
); |
431 |
columnRendererPanelLayout.setVerticalGroup( |
436 |
columnRendererPanelLayout.setVerticalGroup( |
432 |
columnRendererPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
437 |
columnRendererPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
433 |
.add(0, 24, Short.MAX_VALUE) |
438 |
.add(0, 22, Short.MAX_VALUE) |
434 |
); |
439 |
); |
435 |
|
440 |
|
436 |
selectionModelLabel.setLabelFor(selectionModelCombo); |
441 |
selectionModelLabel.setLabelFor(selectionModelCombo); |
Lines 470-485
Link Here
|
470 |
widthMaxCombo.setEditable(true); |
475 |
widthMaxCombo.setEditable(true); |
471 |
widthMaxCombo.setEnabled(false); |
476 |
widthMaxCombo.setEnabled(false); |
472 |
|
477 |
|
|
|
478 |
columnErrorLabel.setForeground(new java.awt.Color(204, 0, 0)); |
479 |
columnErrorLabel.setText(org.openide.util.NbBundle.getMessage(TableCustomizer.class, "TableCustomizer.columnErrorLabel.text")); // NOI18N |
480 |
|
473 |
org.jdesktop.layout.GroupLayout columnsTabLayout = new org.jdesktop.layout.GroupLayout(columnsTab); |
481 |
org.jdesktop.layout.GroupLayout columnsTabLayout = new org.jdesktop.layout.GroupLayout(columnsTab); |
474 |
columnsTab.setLayout(columnsTabLayout); |
482 |
columnsTab.setLayout(columnsTabLayout); |
475 |
columnsTabLayout.setHorizontalGroup( |
483 |
columnsTabLayout.setHorizontalGroup( |
476 |
columnsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
484 |
columnsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
477 |
.add(columnsTabLayout.createSequentialGroup() |
485 |
.add(org.jdesktop.layout.GroupLayout.TRAILING, columnsTabLayout.createSequentialGroup() |
478 |
.addContainerGap() |
486 |
.addContainerGap() |
479 |
.add(columnsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
487 |
.add(columnsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) |
480 |
.add(separator, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 535, Short.MAX_VALUE) |
488 |
.add(org.jdesktop.layout.GroupLayout.LEADING, columnErrorLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 585, Short.MAX_VALUE) |
481 |
.add(org.jdesktop.layout.GroupLayout.TRAILING, columnsTabLayout.createSequentialGroup() |
489 |
.add(org.jdesktop.layout.GroupLayout.LEADING, separator, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 585, Short.MAX_VALUE) |
482 |
.add(columnsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 438, Short.MAX_VALUE) |
490 |
.add(columnsTabLayout.createSequentialGroup() |
|
|
491 |
.add(columnsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 465, Short.MAX_VALUE) |
483 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
492 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
484 |
.add(columnsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) |
493 |
.add(columnsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) |
485 |
.add(insertColumnButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
494 |
.add(insertColumnButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
Lines 490-501
Link Here
|
490 |
.add(deleteColumnButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
499 |
.add(deleteColumnButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
491 |
.add(moveUpColumnButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
500 |
.add(moveUpColumnButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
492 |
.add(moveDownColumnButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) |
501 |
.add(moveDownColumnButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) |
493 |
.add(columnsTabLayout.createSequentialGroup() |
502 |
.add(org.jdesktop.layout.GroupLayout.LEADING, columnsTabLayout.createSequentialGroup() |
494 |
.add(selectionModelLabel) |
503 |
.add(selectionModelLabel) |
495 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
504 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
496 |
.add(selectionModelCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) |
505 |
.add(selectionModelCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) |
497 |
.add(reorderingAllowedChoice) |
506 |
.add(org.jdesktop.layout.GroupLayout.LEADING, reorderingAllowedChoice) |
498 |
.add(columnsTabLayout.createSequentialGroup() |
507 |
.add(org.jdesktop.layout.GroupLayout.LEADING, columnsTabLayout.createSequentialGroup() |
499 |
.add(columnsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
508 |
.add(columnsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
500 |
.add(columnTypeLabel) |
509 |
.add(columnTypeLabel) |
501 |
.add(columnEditorLabel) |
510 |
.add(columnEditorLabel) |
Lines 585-591
Link Here
|
585 |
.add(selectionModelCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) |
594 |
.add(selectionModelCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) |
586 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
595 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
587 |
.add(reorderingAllowedChoice) |
596 |
.add(reorderingAllowedChoice) |
588 |
.addContainerGap(25, Short.MAX_VALUE)) |
597 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) |
|
|
598 |
.add(columnErrorLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 13, Short.MAX_VALUE)) |
589 |
); |
599 |
); |
590 |
|
600 |
|
591 |
columnCountLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(TableCustomizer.class, "LBL_TableCustomizer_Columns_Count_ACSD")); // NOI18N |
601 |
columnCountLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(TableCustomizer.class, "LBL_TableCustomizer_Columns_Count_ACSD")); // NOI18N |
Lines 641-663
Link Here
|
641 |
moveDownRowButton.setEnabled(false); |
651 |
moveDownRowButton.setEnabled(false); |
642 |
moveDownRowButton.addActionListener(formListener); |
652 |
moveDownRowButton.addActionListener(formListener); |
643 |
|
653 |
|
|
|
654 |
rowErrorLabel.setForeground(new java.awt.Color(204, 0, 0)); |
655 |
rowErrorLabel.setText(org.openide.util.NbBundle.getMessage(TableCustomizer.class, "TableCustomizer.rowErrorLabel.text")); // NOI18N |
656 |
|
644 |
org.jdesktop.layout.GroupLayout rowsTabLayout = new org.jdesktop.layout.GroupLayout(rowsTab); |
657 |
org.jdesktop.layout.GroupLayout rowsTabLayout = new org.jdesktop.layout.GroupLayout(rowsTab); |
645 |
rowsTab.setLayout(rowsTabLayout); |
658 |
rowsTab.setLayout(rowsTabLayout); |
646 |
rowsTabLayout.setHorizontalGroup( |
659 |
rowsTabLayout.setHorizontalGroup( |
647 |
rowsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
660 |
rowsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
648 |
.add(rowsTabLayout.createSequentialGroup() |
661 |
.add(org.jdesktop.layout.GroupLayout.TRAILING, rowsTabLayout.createSequentialGroup() |
649 |
.addContainerGap() |
662 |
.addContainerGap() |
650 |
.add(rowsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 437, Short.MAX_VALUE) |
663 |
.add(rowsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) |
651 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
664 |
.add(org.jdesktop.layout.GroupLayout.LEADING, rowErrorLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 585, Short.MAX_VALUE) |
652 |
.add(rowsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
|
|
653 |
.add(rowsTabLayout.createSequentialGroup() |
665 |
.add(rowsTabLayout.createSequentialGroup() |
654 |
.add(rowCountLabel) |
666 |
.add(rowsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 451, Short.MAX_VALUE) |
655 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
667 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
656 |
.add(rowCountSpinner, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE)) |
668 |
.add(rowsTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
657 |
.add(insertRowButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE) |
669 |
.add(rowsTabLayout.createSequentialGroup() |
658 |
.add(deleteRowButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE) |
670 |
.add(rowCountLabel) |
659 |
.add(moveUpRowButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE) |
671 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
660 |
.add(moveDownRowButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, Short.MAX_VALUE)) |
672 |
.add(rowCountSpinner, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE)) |
|
|
673 |
.add(insertRowButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE) |
674 |
.add(deleteRowButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE) |
675 |
.add(moveUpRowButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE) |
676 |
.add(moveDownRowButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)))) |
661 |
.addContainerGap()) |
677 |
.addContainerGap()) |
662 |
); |
678 |
); |
663 |
rowsTabLayout.setVerticalGroup( |
679 |
rowsTabLayout.setVerticalGroup( |
Lines 678-684
Link Here
|
678 |
.add(moveUpRowButton) |
694 |
.add(moveUpRowButton) |
679 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
695 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
680 |
.add(moveDownRowButton))) |
696 |
.add(moveDownRowButton))) |
681 |
.addContainerGap()) |
697 |
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
|
|
698 |
.add(rowErrorLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) |
682 |
); |
699 |
); |
683 |
|
700 |
|
684 |
rowCountLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(TableCustomizer.class, "LBL_TableCustomizer_Rows_Count_ACSD")); // NOI18N |
701 |
rowCountLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(TableCustomizer.class, "LBL_TableCustomizer_Rows_Count_ACSD")); // NOI18N |
Lines 698-704
Link Here
|
698 |
); |
715 |
); |
699 |
layout.setVerticalGroup( |
716 |
layout.setVerticalGroup( |
700 |
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
717 |
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
701 |
.add(tabbedPane) |
718 |
.add(tabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 508, Short.MAX_VALUE) |
702 |
); |
719 |
); |
703 |
|
720 |
|
704 |
tabbedPane.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(TableCustomizer.class, "LBL_TableCustomizer_ACSN")); // NOI18N |
721 |
tabbedPane.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(TableCustomizer.class, "LBL_TableCustomizer_ACSN")); // NOI18N |
Lines 824-829
Link Here
|
824 |
private void rowCountSpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_rowCountSpinnerStateChanged |
841 |
private void rowCountSpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_rowCountSpinnerStateChanged |
825 |
stopCellEditing(rowsTable); |
842 |
stopCellEditing(rowsTable); |
826 |
int rowNo = ((Integer)rowCountSpinner.getValue()).intValue(); |
843 |
int rowNo = ((Integer)rowCountSpinner.getValue()).intValue(); |
|
|
844 |
if (rowNo>ROW_MAX) { |
845 |
rowErrorLabel.setText(NbBundle.getMessage(TableCustomizer.class, "LBL_TableCustomizer_Row_Warning_MaxExceeded")); // NOI18N |
846 |
rowCountSpinner.setValue(rowsTable.getRowCount()); |
847 |
} else if (rowsTable.getRowCount()!=rowNo) { |
848 |
rowErrorLabel.setText(""); // NOI18N |
849 |
} |
827 |
ensureRowCount(rowNo); |
850 |
ensureRowCount(rowNo); |
828 |
}//GEN-LAST:event_rowCountSpinnerStateChanged |
851 |
}//GEN-LAST:event_rowCountSpinnerStateChanged |
829 |
|
852 |
|
Lines 836-841
Link Here
|
836 |
private void columnCountSpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_columnCountSpinnerStateChanged |
859 |
private void columnCountSpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_columnCountSpinnerStateChanged |
837 |
stopCellEditing(columnsTable); |
860 |
stopCellEditing(columnsTable); |
838 |
int columnNo = ((Integer)columnCountSpinner.getValue()).intValue(); |
861 |
int columnNo = ((Integer)columnCountSpinner.getValue()).intValue(); |
|
|
862 |
if (columnNo>COLUMN_MAX) { |
863 |
columnErrorLabel.setText(NbBundle.getMessage(TableCustomizer.class, "LBL_TableCustomizer_Column_Warning_MaxExceeded")); // NOI18N |
864 |
columnCountSpinner.setValue(columnsTable.getRowCount()); |
865 |
} else if (columnsTable.getRowCount()!=columnNo) { |
866 |
columnErrorLabel.setText(""); // NOI18N |
867 |
} |
839 |
ensureColumnCount(columnNo); |
868 |
ensureColumnCount(columnNo); |
840 |
}//GEN-LAST:event_columnCountSpinnerStateChanged |
869 |
}//GEN-LAST:event_columnCountSpinnerStateChanged |
841 |
|
870 |
|
Lines 1046-1051
Link Here
|
1046 |
private javax.swing.JSpinner columnCountSpinner; |
1075 |
private javax.swing.JSpinner columnCountSpinner; |
1047 |
private javax.swing.JLabel columnEditorLabel; |
1076 |
private javax.swing.JLabel columnEditorLabel; |
1048 |
private org.openide.explorer.propertysheet.PropertyPanel columnEditorPanel; |
1077 |
private org.openide.explorer.propertysheet.PropertyPanel columnEditorPanel; |
|
|
1078 |
private javax.swing.JLabel columnErrorLabel; |
1049 |
private javax.swing.JLabel columnExpressionLabel; |
1079 |
private javax.swing.JLabel columnExpressionLabel; |
1050 |
private javax.swing.JLabel columnRendererLabel; |
1080 |
private javax.swing.JLabel columnRendererLabel; |
1051 |
private org.openide.explorer.propertysheet.PropertyPanel columnRendererPanel; |
1081 |
private org.openide.explorer.propertysheet.PropertyPanel columnRendererPanel; |
Lines 1080-1085
Link Here
|
1080 |
private javax.swing.JCheckBox resizableColumnChoice; |
1110 |
private javax.swing.JCheckBox resizableColumnChoice; |
1081 |
private javax.swing.JLabel rowCountLabel; |
1111 |
private javax.swing.JLabel rowCountLabel; |
1082 |
private javax.swing.JSpinner rowCountSpinner; |
1112 |
private javax.swing.JSpinner rowCountSpinner; |
|
|
1113 |
private javax.swing.JLabel rowErrorLabel; |
1083 |
private javax.swing.JScrollPane rowsScrollPane; |
1114 |
private javax.swing.JScrollPane rowsScrollPane; |
1084 |
private javax.swing.JPanel rowsTab; |
1115 |
private javax.swing.JPanel rowsTab; |
1085 |
private javax.swing.JTable rowsTable; |
1116 |
private javax.swing.JTable rowsTable; |
Lines 1567-1600
Link Here
|
1567 |
* @param columnCount number of columns. |
1598 |
* @param columnCount number of columns. |
1568 |
*/ |
1599 |
*/ |
1569 |
private void ensureColumnCount(int columnCount) { |
1600 |
private void ensureColumnCount(int columnCount) { |
1570 |
boolean hardcoded = modelHardcodedChoice.isSelected(); |
1601 |
if (columnCount<=COLUMN_MAX) { |
1571 |
for (int i=columns.size(); i<columnCount; i++) { |
1602 |
boolean hardcoded = modelHardcodedChoice.isSelected(); |
1572 |
columns.add(new ColumnInfo(columnModelProperty, columns.size())); |
1603 |
for (int i=columns.size(); i<columnCount; i++) { |
1573 |
if (hardcoded) { |
1604 |
columns.add(new ColumnInfo(columnModelProperty, columns.size())); |
1574 |
rowTableModel.addColumn(i); |
1605 |
if (hardcoded) { |
|
|
1606 |
rowTableModel.addColumn(i); |
1607 |
} |
1575 |
} |
1608 |
} |
|
|
1609 |
for (int i=columns.size()-1; i>=columnCount; i--) { |
1610 |
if (lastSelectedColumn == i) { |
1611 |
lastSelectedColumn = -1; |
1612 |
} |
1613 |
columns.remove(i); |
1614 |
if (hardcoded) { |
1615 |
rowTableModel.removeColumn(i); |
1616 |
} |
1617 |
} |
1618 |
columnTableModel.fireTableDataChanged(); |
1576 |
} |
1619 |
} |
1577 |
for (int i=columns.size()-1; i>=columnCount; i--) { |
|
|
1578 |
if (lastSelectedColumn == i) { |
1579 |
lastSelectedColumn = -1; |
1580 |
} |
1581 |
columns.remove(i); |
1582 |
if (hardcoded) { |
1583 |
rowTableModel.removeColumn(i); |
1584 |
} |
1585 |
} |
1586 |
columnTableModel.fireTableDataChanged(); |
1587 |
} |
1620 |
} |
1588 |
|
1621 |
|
1589 |
/** |
1622 |
/** |
1590 |
* Ensures that there is correct number of rows in row info table. |
1623 |
* Ensures that there is correct number of rows in row info table. |
1591 |
*/ |
1624 |
*/ |
1592 |
private void ensureRowCount(int rowCount) { |
1625 |
private void ensureRowCount(int rowCount) { |
1593 |
for (int i=rowTableModel.getRowCount(); i<rowCount; i++) { |
1626 |
if (rowCount<=ROW_MAX) { |
1594 |
rowTableModel.addRow(i); |
1627 |
for (int i=rowTableModel.getRowCount(); i<rowCount; i++) { |
1595 |
} |
1628 |
rowTableModel.addRow(i); |
1596 |
for (int i=rowTableModel.getRowCount()-1; i>=rowCount; i--) { |
1629 |
} |
1597 |
rowTableModel.removeRow(i); |
1630 |
for (int i=rowTableModel.getRowCount()-1; i>=rowCount; i--) { |
|
|
1631 |
rowTableModel.removeRow(i); |
1632 |
} |
1598 |
} |
1633 |
} |
1599 |
} |
1634 |
} |
1600 |
|
1635 |
|