package com.intellij.ui.components;

import com.intellij.ui.AnchorableComponent;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.awt.*;

/**
 * @author evgeny.zakrevsky
 */
public class JBRadioButton extends JRadioButton implements AnchorableComponent {
  private JComponent myAnchor;

  public JBRadioButton() {
  }

  public JBRadioButton(Icon icon) {
    super(icon);
  }

  public JBRadioButton(Action a) {
    super(a);
  }

  public JBRadioButton(Icon icon, boolean selected) {
    super(icon, selected);
  }

  public JBRadioButton(String text) {
    super(text);
  }

  public JBRadioButton(String text, boolean selected) {
    super(text, selected);
  }

  public JBRadioButton(String text, Icon icon) {
    super(text, icon);
  }

  public JBRadioButton(String text, Icon icon, boolean selected) {
    super(text, icon, selected);
  }

  @Override
  public JComponent getAnchor() {
    return myAnchor;
  }

  @Override
  public void setAnchor(@Nullable JComponent anchor) {
    this.myAnchor = anchor;
  }

  @Override
  public Dimension getPreferredSize() {
    return myAnchor == null || myAnchor == this ? super.getPreferredSize() : myAnchor.getPreferredSize();
  }

  @Override
  public Dimension getMinimumSize() {
    return myAnchor == null || myAnchor == this ? super.getMinimumSize() : myAnchor.getMinimumSize();
  }
}

@@ -74,16 +74,54 @@
 ponent;%0A
+import org.jetbrains.annotations.Nls;%0A
 import o
@@ -592,32 +592,37 @@
 c JBRadioButton(
+@Nls 
 String text) %7B%0A 
@@ -657,32 +657,37 @@
 c JBRadioButton(
+@Nls 
 String text, boo
@@ -750,32 +750,37 @@
 c JBRadioButton(
+@Nls 
 String text, Ico
@@ -840,16 +840,21 @@
 oButton(
+@Nls 
 String t

Annotate `JBRadioButton` by @Nls