Search in sources :

Example 6 with JBRadioButton

use of com.intellij.ui.components.JBRadioButton in project intellij-community by JetBrains.

the class IdeaGradleProjectSettingsControlBuilder method addGradleChooserComponents.

@Override
public IdeaGradleProjectSettingsControlBuilder addGradleChooserComponents(PaintAwarePanel content, int indentLevel) {
    ButtonGroup buttonGroup = new ButtonGroup();
    if (!dropUseWrapperButton) {
        myUseWrapperButton = new JBRadioButton(GradleBundle.message("gradle.settings.text.use.default_wrapper.configured"));
        myUseWrapperButton.addActionListener(myActionListener);
        buttonGroup.add(myUseWrapperButton);
        content.add(myUseWrapperButton, ExternalSystemUiUtil.getFillLineConstraints(indentLevel));
    }
    if (!dropCustomizableWrapperButton) {
        myUseWrapperWithVerificationButton = new JBRadioButton(GradleBundle.message("gradle.settings.text.use.customizable_wrapper"));
        myUseWrapperWithVerificationButton.addActionListener(myActionListener);
        myUseWrapperVerificationLabel = new JBLabel(GradleBundle.message("gradle.settings.text.wrapper.customization.compatibility"));
        myUseWrapperVerificationLabel.setFont(UIUtil.getLabelFont(UIUtil.FontSize.MINI));
        myUseWrapperVerificationLabel.setIcon(UIUtil.getBalloonInformationIcon());
        buttonGroup.add(myUseWrapperWithVerificationButton);
        content.add(myUseWrapperWithVerificationButton, ExternalSystemUiUtil.getLabelConstraints(indentLevel));
        content.add(myUseWrapperVerificationLabel, ExternalSystemUiUtil.getFillLineConstraints(indentLevel));
    }
    if (!dropUseLocalDistributionButton) {
        myUseLocalDistributionButton = new JBRadioButton(GradleBundle.message("gradle.settings.text.use.local.distribution"));
        myUseLocalDistributionButton.addActionListener(myActionListener);
        buttonGroup.add(myUseLocalDistributionButton);
        content.add(myUseLocalDistributionButton, ExternalSystemUiUtil.getFillLineConstraints(indentLevel));
    }
    if (!dropUseBundledDistributionButton) {
        myUseBundledDistributionButton = new JBRadioButton(GradleBundle.message("gradle.settings.text.use.bundled.distribution", GradleVersion.current().getVersion()));
        myUseBundledDistributionButton.addActionListener(myActionListener);
        buttonGroup.add(myUseBundledDistributionButton);
        //content.add(Box.createGlue(), ExternalSystemUiUtil.getFillLineConstraints(indentLevel));
        content.add(myUseBundledDistributionButton, ExternalSystemUiUtil.getFillLineConstraints(indentLevel));
    }
    return this;
}
Also used : JBLabel(com.intellij.ui.components.JBLabel) JBRadioButton(com.intellij.ui.components.JBRadioButton)

Example 7 with JBRadioButton

use of com.intellij.ui.components.JBRadioButton in project intellij-community by JetBrains.

the class IpnbConfigurable method createModeRadioButton.

@NotNull
private static JBRadioButton createModeRadioButton(@NotNull String text) {
    final JBRadioButton local = new JBRadioButton(text);
    local.setFocusable(false);
    local.setBorder(null);
    return local;
}
Also used : JBRadioButton(com.intellij.ui.components.JBRadioButton) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

JBRadioButton (com.intellij.ui.components.JBRadioButton)7 NotNull (org.jetbrains.annotations.NotNull)3 JBLabel (com.intellij.ui.components.JBLabel)2 FileChooserDescriptor (com.intellij.openapi.fileChooser.FileChooserDescriptor)1 TextFieldWithBrowseButton (com.intellij.openapi.ui.TextFieldWithBrowseButton)1 GridConstraints (com.intellij.uiDesigner.core.GridConstraints)1 GridBag (com.intellij.util.ui.GridBag)1 JBEmptyBorder (com.intellij.util.ui.JBEmptyBorder)1 FocusAdapter (java.awt.event.FocusAdapter)1 FocusEvent (java.awt.event.FocusEvent)1 MouseAdapter (java.awt.event.MouseAdapter)1 MouseEvent (java.awt.event.MouseEvent)1 Nullable (org.jetbrains.annotations.Nullable)1