Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="12" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="10" bottom="10" right="10"/>
<constraints>
<xy x="48" y="54" width="888" height="657"/>
<xy x="48" y="54" width="1056" height="1327"/>
</constraints>
<properties>
<preferredSize width="400" height="600"/>
<preferredSize width="838" height="619"/>
</properties>
<border type="none"/>
<children>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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 -> {
Expand Down Expand Up @@ -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));
}
}