[vcs] VcsDirectoryConfigurationPanel: DRY GridBag configuration.

This commit is contained in:
Kirill Likhodedov
2013-01-16 14:24:27 +04:00
parent ef428d89aa
commit d451fcbfc5
@@ -328,22 +328,22 @@ public class VcsDirectoryConfigurationPanel extends PanelWithButtons implements
}
protected JComponent createMainComponent() {
myLimitHistory = new VcsLimitHistoryConfigurable(myProject);
JPanel panel = new JPanel(new GridBagLayout());
GridBag gb = new GridBag()
.setDefaultInsets(new Insets(0, 0, DEFAULT_VGAP, DEFAULT_HGAP))
.setDefaultWeightX(1)
.setDefaultWeightY(0)
.setDefaultFill(GridBagConstraints.BOTH);
.setDefaultFill(GridBagConstraints.HORIZONTAL);
panel.add(createMappingsTable(), gb.nextLine().next().fillCell().weighty(1));
panel.add(createProjectMappingDescription(), gb.nextLine().next().fillCellHorizontally());
myLimitHistory = new VcsLimitHistoryConfigurable(myProject);
panel.add(myLimitHistory.createComponent(), gb.nextLine().next().fillCellHorizontally());
panel.add(createErrorList(), gb.nextLine().next().fillCellHorizontally());
panel.add(createShowRecursivelyDirtyOption(), gb.nextLine().next().fillCellHorizontally());
panel.add(createStoreBaseRevisionOption(), gb.nextLine().next().fillCellHorizontally());
panel.add(createShowChangedOption(), gb.nextLine().next().fillCellHorizontally());
panel.add(createShowVcsRootErrorNotificationOption(), gb.nextLine().next().fillCellHorizontally());
panel.add(createMappingsTable(), gb.nextLine().next().fillCell().weighty(1.0));
panel.add(createProjectMappingDescription(), gb.nextLine().next());
panel.add(createErrorList(), gb.nextLine().next());
panel.add(myLimitHistory.createComponent(), gb.nextLine().next());
panel.add(createShowRecursivelyDirtyOption(), gb.nextLine().next());
panel.add(createStoreBaseRevisionOption(), gb.nextLine().next());
panel.add(createShowChangedOption(), gb.nextLine().next());
panel.add(createShowVcsRootErrorNotificationOption(), gb.nextLine().next());
return panel;
}