diff --git a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentFormDialog.form b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentFormDialog.form index de0810bb8..a5599e727 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentFormDialog.form +++ b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentFormDialog.form @@ -3,10 +3,10 @@ - + - + diff --git a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentFormDialog.java b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentFormDialog.java index e88f7ce5c..7875c59df 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentFormDialog.java +++ b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentFormDialog.java @@ -53,7 +53,6 @@ import com.magento.idea.magento2plugin.ui.table.TableButton; import com.magento.idea.magento2plugin.util.magento.GetAclResourcesListUtil; import com.magento.idea.magento2plugin.util.magento.GetModuleNameByDirectoryUtil; -import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; @@ -205,7 +204,6 @@ public class NewUiComponentFormDialog extends AbstractDialog { public NewUiComponentFormDialog(final Project project, final PsiDirectory directory) { super(); this.project = project; - updateDialogSizeToDefaults(); formButtonsValidator = new FormButtonsValidator(this); formFieldsetsValidator = new FormFieldsetsValidator(this); formFieldsValidator = new FormFieldsValidator(this); @@ -286,10 +284,11 @@ protected void initButtonsTable() { } protected void initFieldSetsTable() { + final Integer rowPosition = 10; final DefaultTableModel model = getFieldsetsModel(); model.setDataVector( - new Object[][] {{"general", "General","10",DELETE_COLUMN}}, - new Object[] { NAME_COLUMN, LABEL_COLUMN, SORT_ORDER_COLUMN, ACTION_COLUMN} + new Object[][] {{"General", rowPosition, DELETE_COLUMN}}, + new Object[] { LABEL_COLUMN, SORT_ORDER_COLUMN, ACTION_COLUMN} ); final TableColumn column = fieldsets.getColumn(ACTION_COLUMN); @@ -298,7 +297,7 @@ protected void initFieldSetsTable() { new DeleteRowButton(new JCheckBox())); addFieldset.addActionListener(e -> { - model.addRow(new Object[] {"","",DELETE_COLUMN}); + model.addRow(new Object[] {"", rowPosition + 10, DELETE_COLUMN}); }); model.addTableModelListener( event -> { @@ -755,9 +754,4 @@ protected boolean validateFormFields() { && formFieldsetsValidator.validate() && formFieldsValidator.validate(); } - - private void updateDialogSizeToDefaults() { - final Dimension screenSize = getToolkit().getScreenSize(); - setPreferredSize(new Dimension(screenSize.width / 2, screenSize.height / 2)); - } }