This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 175012
Collapse All | Expand All

(-)a/form/src/org/netbeans/modules/form/editors/Bundle.properties (+4 lines)
Lines 250-255 Link Here
250
LBL_TableCustomizer_Column_Renderer=&Renderer\:
250
LBL_TableCustomizer_Column_Renderer=&Renderer\:
251
LBL_TableCustomizer_Column_Renderer_ACSD=N/A
251
LBL_TableCustomizer_Column_Renderer_ACSD=N/A
252
LBL_TableCustomizer_Column_Expression=Ex&pression\:
252
LBL_TableCustomizer_Column_Expression=Ex&pression\:
253
LBL_TableCustomizer_Column_Warning_MaxExceeded=Maximum columns (100) exceeded - re-setting to previous column count
253
LBL_TableCustomizer_SelectionModel=&Selection Model\:
254
LBL_TableCustomizer_SelectionModel=&Selection Model\:
254
LBL_TableCustomizer_SelectionModel_ACSD=N/A
255
LBL_TableCustomizer_SelectionModel_ACSD=N/A
255
LBL_TableCustomizer_ReorderingAllowed=&Allow to reorder columns by drag and drop
256
LBL_TableCustomizer_ReorderingAllowed=&Allow to reorder columns by drag and drop
Lines 290-298 Link Here
290
LBL_TableCustomizer_Rows_MoveDown_ACSD=N/A
291
LBL_TableCustomizer_Rows_MoveDown_ACSD=N/A
291
LBL_TableCustomizer_Rows_Table=Rows
292
LBL_TableCustomizer_Rows_Table=Rows
292
LBL_TableCustomizer_Rows_Table_ACSD=N/A
293
LBL_TableCustomizer_Rows_Table_ACSD=N/A
294
LBL_TableCustomizer_Row_Warning_MaxExceeded=Maximum rows (100) exceeded - re-setting to previous row count
293
LBL_TableCustomizer_Title=Title
295
LBL_TableCustomizer_Title=Title
294
LBL_TableCustomizer_Expression=Expression
296
LBL_TableCustomizer_Expression=Expression
295
LBL_TableCustomizer_Type=Type
297
LBL_TableCustomizer_Type=Type
296
LBL_TableCustomizer_ResizableH=Resizable
298
LBL_TableCustomizer_ResizableH=Resizable
297
LBL_TableCustomizer_EditableH=Editable
299
LBL_TableCustomizer_EditableH=Editable
298
MSG_TableCustomizer_ModelPropertyError=Unable to set the model of the table!
300
MSG_TableCustomizer_ModelPropertyError=Unable to set the model of the table!
301
TableCustomizer.columnErrorLabel.text=
302
TableCustomizer.rowErrorLabel.text=
(-)a/form/src/org/netbeans/modules/form/editors/TableCustomizer.form (-26 / +55 lines)
Lines 1-4 Link Here
1
<?xml version="1.0" encoding="UTF-8" ?>
1
<?xml version="1.1" encoding="UTF-8" ?>
2
2
3
<Form version="1.5" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
3
<Form version="1.5" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4
  <NonVisualComponents>
4
  <NonVisualComponents>
Lines 28-33 Link Here
28
  <AuxValues>
28
  <AuxValues>
29
    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
29
    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
30
    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
30
    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
31
    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
31
    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
32
    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
32
    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
33
    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
33
    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
34
    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
Lines 44-50 Link Here
44
    </DimensionLayout>
45
    </DimensionLayout>
45
    <DimensionLayout dim="1">
46
    <DimensionLayout dim="1">
46
      <Group type="103" groupAlignment="0" attributes="0">
47
      <Group type="103" groupAlignment="0" attributes="0">
47
          <Component id="tabbedPane" alignment="0" max="32767" attributes="0"/>
48
          <Component id="tabbedPane" alignment="0" pref="508" max="32767" attributes="0"/>
48
      </Group>
49
      </Group>
49
    </DimensionLayout>
50
    </DimensionLayout>
50
  </Layout>
51
  </Layout>
Lines 110-116 Link Here
110
                      <Component id="modelCustomChoice" min="-2" max="-2" attributes="0"/>
111
                      <Component id="modelCustomChoice" min="-2" max="-2" attributes="0"/>
111
                      <EmptySpace min="-2" max="-2" attributes="0"/>
112
                      <EmptySpace min="-2" max="-2" attributes="0"/>
112
                      <Component id="modelCustomPanel" min="-2" max="-2" attributes="0"/>
113
                      <Component id="modelCustomPanel" min="-2" max="-2" attributes="0"/>
113
                      <EmptySpace pref="58" max="32767" attributes="0"/>
114
                      <EmptySpace pref="63" max="32767" attributes="0"/>
114
                  </Group>
115
                  </Group>
115
              </Group>
116
              </Group>
116
            </DimensionLayout>
117
            </DimensionLayout>
Lines 180-186 Link Here
180
              <Layout>
181
              <Layout>
181
                <DimensionLayout dim="0">
182
                <DimensionLayout dim="0">
182
                  <Group type="103" groupAlignment="0" attributes="0">
183
                  <Group type="103" groupAlignment="0" attributes="0">
183
                      <EmptySpace min="0" pref="535" max="32767" attributes="0"/>
184
                      <EmptySpace min="0" pref="585" max="32767" attributes="0"/>
184
                  </Group>
185
                  </Group>
185
                </DimensionLayout>
186
                </DimensionLayout>
186
                <DimensionLayout dim="1">
187
                <DimensionLayout dim="1">
Lines 224-230 Link Here
224
              <Layout>
225
              <Layout>
225
                <DimensionLayout dim="0">
226
                <DimensionLayout dim="0">
226
                  <Group type="103" groupAlignment="0" attributes="0">
227
                  <Group type="103" groupAlignment="0" attributes="0">
227
                      <EmptySpace min="0" pref="535" max="32767" attributes="0"/>
228
                      <EmptySpace min="0" pref="585" max="32767" attributes="0"/>
228
                  </Group>
229
                  </Group>
229
                </DimensionLayout>
230
                </DimensionLayout>
230
                <DimensionLayout dim="1">
231
                <DimensionLayout dim="1">
Lines 268-274 Link Here
268
              <Layout>
269
              <Layout>
269
                <DimensionLayout dim="0">
270
                <DimensionLayout dim="0">
270
                  <Group type="103" groupAlignment="0" attributes="0">
271
                  <Group type="103" groupAlignment="0" attributes="0">
271
                      <EmptySpace min="0" pref="535" max="32767" attributes="0"/>
272
                      <EmptySpace min="0" pref="585" max="32767" attributes="0"/>
272
                  </Group>
273
                  </Group>
273
                </DimensionLayout>
274
                </DimensionLayout>
274
                <DimensionLayout dim="1">
275
                <DimensionLayout dim="1">
Lines 294-305 Link Here
294
          <Layout>
295
          <Layout>
295
            <DimensionLayout dim="0">
296
            <DimensionLayout dim="0">
296
              <Group type="103" groupAlignment="0" attributes="0">
297
              <Group type="103" groupAlignment="0" attributes="0">
297
                  <Group type="102" attributes="0">
298
                  <Group type="102" alignment="1" attributes="0">
298
                      <EmptySpace min="-2" max="-2" attributes="0"/>
299
                      <EmptySpace max="-2" attributes="0"/>
299
                      <Group type="103" groupAlignment="0" attributes="0">
300
                      <Group type="103" groupAlignment="1" attributes="0">
300
                          <Component id="separator" alignment="0" pref="535" max="32767" attributes="0"/>
301
                          <Component id="columnErrorLabel" alignment="0" pref="585" max="32767" attributes="0"/>
302
                          <Component id="separator" alignment="0" pref="585" max="32767" attributes="0"/>
301
                          <Group type="102" alignment="1" attributes="0">
303
                          <Group type="102" alignment="1" attributes="0">
302
                              <Component id="columnsScrollPane" pref="438" max="32767" attributes="0"/>
304
                              <Component id="columnsScrollPane" pref="465" max="32767" attributes="0"/>
303
                              <EmptySpace max="-2" attributes="0"/>
305
                              <EmptySpace max="-2" attributes="0"/>
304
                              <Group type="103" groupAlignment="1" max="-2" attributes="0">
306
                              <Group type="103" groupAlignment="1" max="-2" attributes="0">
305
                                  <Component id="insertColumnButton" alignment="1" max="32767" attributes="1"/>
307
                                  <Component id="insertColumnButton" alignment="1" max="32767" attributes="1"/>
Lines 432-438 Link Here
432
                      </Group>
434
                      </Group>
433
                      <EmptySpace max="-2" attributes="0"/>
435
                      <EmptySpace max="-2" attributes="0"/>
434
                      <Component id="reorderingAllowedChoice" min="-2" max="-2" attributes="0"/>
436
                      <Component id="reorderingAllowedChoice" min="-2" max="-2" attributes="0"/>
435
                      <EmptySpace pref="25" max="32767" attributes="0"/>
437
                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
438
                      <Component id="columnErrorLabel" pref="13" max="32767" attributes="0"/>
436
                  </Group>
439
                  </Group>
437
              </Group>
440
              </Group>
438
            </DimensionLayout>
441
            </DimensionLayout>
Lines 655-661 Link Here
655
                </DimensionLayout>
658
                </DimensionLayout>
656
                <DimensionLayout dim="1">
659
                <DimensionLayout dim="1">
657
                  <Group type="103" groupAlignment="0" attributes="0">
660
                  <Group type="103" groupAlignment="0" attributes="0">
658
                      <EmptySpace min="0" pref="24" max="32767" attributes="0"/>
661
                      <EmptySpace min="0" pref="22" max="32767" attributes="0"/>
659
                  </Group>
662
                  </Group>
660
                </DimensionLayout>
663
                </DimensionLayout>
661
              </Layout>
664
              </Layout>
Lines 691-697 Link Here
691
                </DimensionLayout>
694
                </DimensionLayout>
692
                <DimensionLayout dim="1">
695
                <DimensionLayout dim="1">
693
                  <Group type="103" groupAlignment="0" attributes="0">
696
                  <Group type="103" groupAlignment="0" attributes="0">
694
                      <EmptySpace min="0" pref="24" max="32767" attributes="0"/>
697
                      <EmptySpace min="0" pref="22" max="32767" attributes="0"/>
695
                  </Group>
698
                  </Group>
696
                </DimensionLayout>
699
                </DimensionLayout>
697
              </Layout>
700
              </Layout>
Lines 714-720 Link Here
714
                </DimensionLayout>
717
                </DimensionLayout>
715
                <DimensionLayout dim="1">
718
                <DimensionLayout dim="1">
716
                  <Group type="103" groupAlignment="0" attributes="0">
719
                  <Group type="103" groupAlignment="0" attributes="0">
717
                      <EmptySpace min="0" pref="24" max="32767" attributes="0"/>
720
                      <EmptySpace min="0" pref="22" max="32767" attributes="0"/>
718
                  </Group>
721
                  </Group>
719
                </DimensionLayout>
722
                </DimensionLayout>
720
              </Layout>
723
              </Layout>
Lines 920-925 Link Here
920
                <AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="placeHolder2.setVisible(false);"/>
923
                <AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="placeHolder2.setVisible(false);"/>
921
              </AuxValues>
924
              </AuxValues>
922
            </Component>
925
            </Component>
926
            <Component class="javax.swing.JLabel" name="columnErrorLabel">
927
              <Properties>
928
                <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
929
                  <Color blue="0" green="0" red="cc" type="rgb"/>
930
                </Property>
931
                <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
932
                  <ResourceString bundle="org/netbeans/modules/form/editors/Bundle.properties" key="TableCustomizer.columnErrorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
933
                </Property>
934
              </Properties>
935
            </Component>
923
          </SubComponents>
936
          </SubComponents>
924
        </Container>
937
        </Container>
925
        <Container class="javax.swing.JPanel" name="rowsTab">
938
        <Container class="javax.swing.JPanel" name="rowsTab">
Lines 936-955 Link Here
936
          <Layout>
949
          <Layout>
937
            <DimensionLayout dim="0">
950
            <DimensionLayout dim="0">
938
              <Group type="103" groupAlignment="0" attributes="0">
951
              <Group type="103" groupAlignment="0" attributes="0">
939
                  <Group type="102" alignment="0" attributes="0">
952
                  <Group type="102" alignment="1" attributes="0">
940
                      <EmptySpace max="-2" attributes="0"/>
953
                      <EmptySpace max="-2" attributes="0"/>
941
                      <Component id="rowsScrollPane" pref="437" max="32767" attributes="0"/>
954
                      <Group type="103" groupAlignment="1" attributes="0">
942
                      <EmptySpace max="-2" attributes="0"/>
955
                          <Component id="rowErrorLabel" alignment="0" pref="585" max="32767" attributes="0"/>
943
                      <Group type="103" groupAlignment="0" attributes="0">
956
                          <Group type="102" alignment="1" attributes="0">
944
                          <Group type="102" alignment="0" attributes="1">
957
                              <Component id="rowsScrollPane" pref="451" max="32767" attributes="0"/>
945
                              <Component id="rowCountLabel" min="-2" max="-2" attributes="0"/>
946
                              <EmptySpace max="-2" attributes="0"/>
958
                              <EmptySpace max="-2" attributes="0"/>
947
                              <Component id="rowCountSpinner" pref="55" max="32767" attributes="0"/>
959
                              <Group type="103" groupAlignment="0" attributes="0">
960
                                  <Group type="102" alignment="0" attributes="1">
961
                                      <Component id="rowCountLabel" min="-2" max="-2" attributes="0"/>
962
                                      <EmptySpace max="-2" attributes="0"/>
963
                                      <Component id="rowCountSpinner" pref="69" max="32767" attributes="0"/>
964
                                  </Group>
965
                                  <Component id="insertRowButton" pref="122" max="32767" attributes="1"/>
966
                                  <Component id="deleteRowButton" pref="122" max="32767" attributes="1"/>
967
                                  <Component id="moveUpRowButton" pref="122" max="32767" attributes="1"/>
968
                                  <Component id="moveDownRowButton" pref="122" max="32767" attributes="1"/>
969
                              </Group>
948
                          </Group>
970
                          </Group>
949
                          <Component id="insertRowButton" pref="92" max="32767" attributes="1"/>
950
                          <Component id="deleteRowButton" pref="92" max="32767" attributes="1"/>
951
                          <Component id="moveUpRowButton" pref="92" max="32767" attributes="1"/>
952
                          <Component id="moveDownRowButton" pref="92" max="32767" attributes="1"/>
953
                      </Group>
971
                      </Group>
954
                      <EmptySpace max="-2" attributes="0"/>
972
                      <EmptySpace max="-2" attributes="0"/>
955
                  </Group>
973
                  </Group>
Lines 977-982 Link Here
977
                          </Group>
995
                          </Group>
978
                      </Group>
996
                      </Group>
979
                      <EmptySpace max="-2" attributes="0"/>
997
                      <EmptySpace max="-2" attributes="0"/>
998
                      <Component id="rowErrorLabel" min="-2" pref="18" max="-2" attributes="0"/>
980
                  </Group>
999
                  </Group>
981
              </Group>
1000
              </Group>
982
            </DimensionLayout>
1001
            </DimensionLayout>
Lines 1106-1111 Link Here
1106
                <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
1125
                <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
1107
              </AuxValues>
1126
              </AuxValues>
1108
            </Component>
1127
            </Component>
1128
            <Component class="javax.swing.JLabel" name="rowErrorLabel">
1129
              <Properties>
1130
                <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
1131
                  <Color blue="0" green="0" red="cc" type="rgb"/>
1132
                </Property>
1133
                <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
1134
                  <ResourceString bundle="org/netbeans/modules/form/editors/Bundle.properties" key="TableCustomizer.rowErrorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
1135
                </Property>
1136
              </Properties>
1137
            </Component>
1109
          </SubComponents>
1138
          </SubComponents>
1110
        </Container>
1139
        </Container>
1111
      </SubComponents>
1140
      </SubComponents>
(-)a/form/src/org/netbeans/modules/form/editors/TableCustomizer.java (-48 / +83 lines)
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

Return to bug 175012