5353import com .magento .idea .magento2plugin .ui .table .TableButton ;
5454import com .magento .idea .magento2plugin .util .magento .GetAclResourcesListUtil ;
5555import com .magento .idea .magento2plugin .util .magento .GetModuleNameByDirectoryUtil ;
56- import java .awt .Dimension ;
5756import java .awt .event .ActionEvent ;
5857import java .awt .event .ActionListener ;
5958import java .awt .event .KeyEvent ;
@@ -205,7 +204,6 @@ public class NewUiComponentFormDialog extends AbstractDialog {
205204 public NewUiComponentFormDialog (final Project project , final PsiDirectory directory ) {
206205 super ();
207206 this .project = project ;
208- updateDialogSizeToDefaults ();
209207 formButtonsValidator = new FormButtonsValidator (this );
210208 formFieldsetsValidator = new FormFieldsetsValidator (this );
211209 formFieldsValidator = new FormFieldsValidator (this );
@@ -286,10 +284,11 @@ protected void initButtonsTable() {
286284 }
287285
288286 protected void initFieldSetsTable () {
287+ final Integer rowPosition = 10 ;
289288 final DefaultTableModel model = getFieldsetsModel ();
290289 model .setDataVector (
291- new Object [][] {{"general " , "General" , "10" , DELETE_COLUMN }},
292- new Object [] { NAME_COLUMN , LABEL_COLUMN , SORT_ORDER_COLUMN , ACTION_COLUMN }
290+ new Object [][] {{"General " , rowPosition , DELETE_COLUMN }},
291+ new Object [] { LABEL_COLUMN , SORT_ORDER_COLUMN , ACTION_COLUMN }
293292 );
294293
295294 final TableColumn column = fieldsets .getColumn (ACTION_COLUMN );
@@ -298,7 +297,7 @@ protected void initFieldSetsTable() {
298297 new DeleteRowButton (new JCheckBox ()));
299298
300299 addFieldset .addActionListener (e -> {
301- model .addRow (new Object [] {"" ,"" , DELETE_COLUMN });
300+ model .addRow (new Object [] {"" , rowPosition + 10 , DELETE_COLUMN });
302301 });
303302 model .addTableModelListener (
304303 event -> {
@@ -755,9 +754,4 @@ protected boolean validateFormFields() {
755754 && formFieldsetsValidator .validate ()
756755 && formFieldsValidator .validate ();
757756 }
758-
759- private void updateDialogSizeToDefaults () {
760- final Dimension screenSize = getToolkit ().getScreenSize ();
761- setPreferredSize (new Dimension (screenSize .width / 2 , screenSize .height / 2 ));
762- }
763757}
0 commit comments