labels layout fixed in application run configuration

This commit is contained in:
Evgeny Zakrevsky
2012-08-31 17:15:37 +04:00
parent fb88a4fa75
commit 54887c4378
4 changed files with 12 additions and 6 deletions
@@ -32,6 +32,7 @@ import com.intellij.psi.PsiElement;
import com.intellij.psi.util.PsiMethodUtil;
import com.intellij.ui.EditorTextFieldWithBrowseButton;
import com.intellij.ui.PanelWithAnchor;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -64,7 +65,7 @@ public class ApplicationConfigurable extends SettingsEditor<ApplicationConfigura
ClassBrowser.createApplicationClassBrowser(project, myModuleSelector).setField(getMainClassField());
myVersionDetector = new JreVersionDetector();
setAnchor(myModule.getAnchor());
myAnchor = UIUtil.mergeComponentsWithAnchor(myMainClass, myCommonProgramParameters, myAlternativeJREPanel, myModule);
}
public void applyEditorTo(final ApplicationConfiguration configuration) throws ConfigurationException {
@@ -42,6 +42,7 @@ public class AlternativeJREPanel extends JPanel implements PanelWithAnchor {
private final ComponentWithBrowseButton<TextFieldWithHistory> myPathField;
private final JBCheckBox myCbEnabled;
final TextFieldWithHistory myFieldWithHistory;
private JComponent myAnchor;
public AlternativeJREPanel() {
super(new GridBagLayout());
@@ -79,6 +80,9 @@ public class AlternativeJREPanel extends JPanel implements PanelWithAnchor {
}
});
enabledChanged();
setAnchor(myCbEnabled);
updateUI();
}
@@ -112,11 +116,12 @@ public class AlternativeJREPanel extends JPanel implements PanelWithAnchor {
@Override
public JComponent getAnchor() {
return myCbEnabled.getAnchor();
return myAnchor;
}
@Override
public void setAnchor(JComponent anchor) {
myAnchor = anchor;
myCbEnabled.setAnchor(anchor);
}
@@ -13,7 +13,7 @@
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<border type="empty"/>
<children>
<grid id="452da" layout-manager="GridLayoutManager" row-count="6" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>