@@ -205,7 +205,6 @@ public class NewUiComponentFormDialog extends AbstractDialog {
205
205
public NewUiComponentFormDialog (final Project project , final PsiDirectory directory ) {
206
206
super ();
207
207
this .project = project ;
208
- updateDialogSizeToDefaults ();
209
208
formButtonsValidator = new FormButtonsValidator (this );
210
209
formFieldsetsValidator = new FormFieldsetsValidator (this );
211
210
formFieldsValidator = new FormFieldsValidator (this );
@@ -286,9 +285,10 @@ protected void initButtonsTable() {
286
285
}
287
286
288
287
protected void initFieldSetsTable () {
288
+ Integer rowPosition = 10 ;
289
289
final DefaultTableModel model = getFieldsetsModel ();
290
290
model .setDataVector (
291
- new Object [][] {{"General" ,"10" , DELETE_COLUMN }},
291
+ new Object [][] {{"General" , rowPosition , DELETE_COLUMN }},
292
292
new Object [] { LABEL_COLUMN , SORT_ORDER_COLUMN , ACTION_COLUMN }
293
293
);
294
294
@@ -298,7 +298,7 @@ protected void initFieldSetsTable() {
298
298
new DeleteRowButton (new JCheckBox ()));
299
299
300
300
addFieldset .addActionListener (e -> {
301
- model .addRow (new Object [] {"" ,"" , DELETE_COLUMN });
301
+ model .addRow (new Object [] {"" , rowPosition + 10 , DELETE_COLUMN });
302
302
});
303
303
model .addTableModelListener (
304
304
event -> {
@@ -753,9 +753,4 @@ protected boolean validateFormFields() {
753
753
&& formFieldsetsValidator .validate ()
754
754
&& formFieldsValidator .validate ();
755
755
}
756
-
757
- private void updateDialogSizeToDefaults () {
758
- final Dimension screenSize = getToolkit ().getScreenSize ();
759
- setPreferredSize (new Dimension (screenSize .width / 2 , screenSize .height / 2 ));
760
- }
761
756
}
0 commit comments