Skip to content

Commit

Permalink
Fix radio component layout
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-wyluda committed Jul 7, 2014
1 parent c834f45 commit b3f642b
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
package org.jboss.forge.plugin.idea.ui.component;

import com.intellij.ui.components.JBLabel;
import net.miginfocom.swing.MigLayout;
import org.jboss.forge.addon.convert.Converter;
import org.jboss.forge.addon.convert.ConverterFactory;
import org.jboss.forge.addon.ui.hints.InputType;
Expand All @@ -28,17 +28,12 @@ public class RadioComponentBuilder extends ComponentBuilder
@Override
public ForgeComponent build(final InputComponent<?, Object> input)
{
return new ForgeComponent()
return new LabeledComponent(input, new ForgeComponent()
{
@Override
public void buildUI(Container container)
{
JBLabel label = new JBLabel();
label.setText(input.getLabel() == null ? input.getName() : input
.getLabel());
container.add(label);

JPanel radioContainer = new JPanel(new FlowLayout());
JPanel radioContainer = new JPanel(new MigLayout("left"));
container.add(radioContainer);
final ConverterFactory converterFactory = ServiceHelper.getForgeService()
.getConverterFactory();
Expand Down Expand Up @@ -72,7 +67,7 @@ public void actionPerformed(ActionEvent e)
}
}
}
};
});
}

@Override
Expand Down

0 comments on commit b3f642b

Please sign in to comment.