Remove checkbox for copying js implementation files in 'Configure Kotlin as Javascript' dialog

This commit is contained in:
Natalia.Ukhorskaya
2013-09-17 15:18:13 +04:00
parent 706aa039dc
commit dee186de08
2 changed files with 11 additions and 18 deletions
@@ -30,15 +30,6 @@
<text value="&amp;Make local copy of library (could be stored in VCS) "/>
</properties>
</component>
<component id="dd25b" class="javax.swing.JCheckBox" binding="copyJsFilesCheckbox" default-binding="true">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<selected value="true"/>
<text value="&amp;Get JavaScript runtime files"/>
</properties>
</component>
<grid id="11e35" binding="copyJsFilesPanelPlace" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="3" use-parent-layout="false"/>
@@ -55,6 +46,14 @@
<border type="none"/>
<children/>
</grid>
<component id="70a46" class="javax.swing.JLabel">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<text value="JavaScript runtime files"/>
</properties>
</component>
</children>
</grid>
<component id="982e8" class="javax.swing.JLabel" binding="compilerTextLabel">
@@ -34,7 +34,6 @@ public abstract class CreateJavaScriptLibraryDialogBase extends DialogWrapper im
protected JPanel contentPane;
protected JCheckBox copyJarCheckbox;
protected JCheckBox copyJsFilesCheckbox;
protected JPanel copyJsFilesPanelPlace;
protected JPanel copyJarFilePanelPlace;
protected JLabel compilerTextLabel;
@@ -77,24 +76,20 @@ public abstract class CreateJavaScriptLibraryDialogBase extends DialogWrapper im
if (!showPathToJsFilePanel) {
copyJsFilesPanelPlace.setVisible(false);
copyJsFilesCheckbox.setVisible(false);
}
ActionListener updateComponentsListener = new ActionListener() {
copyJarCheckbox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(@NotNull ActionEvent e) {
updateComponents();
}
};
copyJarCheckbox.addActionListener(updateComponentsListener);
copyJsFilesCheckbox.addActionListener(updateComponentsListener);
});
}
@Override
@Nullable
public String getCopyJsIntoPath() {
if (!copyJsFilesCheckbox.isSelected()) return null;
if (!copyJsFilesPanelPlace.isVisible()) return null;
return copyJsFilesPanel.getPath();
}
@@ -106,7 +101,6 @@ public abstract class CreateJavaScriptLibraryDialogBase extends DialogWrapper im
protected void updateComponents() {
copyJarPanel.setEnabled(copyJarCheckbox.isSelected());
copyJsFilesPanel.setEnabled(copyJsFilesCheckbox.isSelected());
setOKActionEnabled(!copyJsFilesPanel.hasErrors() && !copyJarPanel.hasErrors());
}