use of com.intellij.ui.OptionGroup in project intellij-community by JetBrains.
the class ExportToHTMLDialog method createNorthPanel.
@Override
protected JComponent createNorthPanel() {
OptionGroup optionGroup = new OptionGroup();
myRbCurrentFile = new JRadioButton(CodeEditorBundle.message("export.to.html.file.name.radio", (myFileName != null ? myFileName : "")));
optionGroup.add(myRbCurrentFile);
myRbSelectedText = new JRadioButton(CodeEditorBundle.message("export.to.html.selected.text.radio"));
optionGroup.add(myRbSelectedText);
myRbCurrentPackage = new JRadioButton(CodeEditorBundle.message("export.to.html.all.files.in.directory.radio", (myDirectoryName != null ? myDirectoryName : "")));
optionGroup.add(myRbCurrentPackage);
myCbIncludeSubpackages = new JCheckBox(CodeEditorBundle.message("export.to.html.include.subdirectories.checkbox"));
optionGroup.add(myCbIncludeSubpackages, true);
FileTextField field = FileChooserFactory.getInstance().createFileTextField(FileChooserDescriptorFactory.createSingleFolderDescriptor(), myDisposable);
myTargetDirectoryField = new TextFieldWithBrowseButton(field.getField());
LabeledComponent<TextFieldWithBrowseButton> labeledComponent = assignLabel(myTargetDirectoryField, myProject);
optionGroup.add(labeledComponent);
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.add(myRbCurrentFile);
buttonGroup.add(myRbSelectedText);
buttonGroup.add(myRbCurrentPackage);
ActionListener actionListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
myCbIncludeSubpackages.setEnabled(myRbCurrentPackage.isSelected());
}
};
myRbCurrentFile.addActionListener(actionListener);
myRbSelectedText.addActionListener(actionListener);
myRbCurrentPackage.addActionListener(actionListener);
return optionGroup.createPanel();
}
use of com.intellij.ui.OptionGroup in project intellij-community by JetBrains.
the class CodeStyleBlankLinesPanel method createOptionsGroup.
@Nullable
private OptionGroup createOptionsGroup(@NotNull String groupName, @NotNull List<CodeStyleSettingPresentation> settings) {
OptionGroup optionGroup = new OptionGroup(groupName);
for (CodeStyleSettingPresentation setting : settings) {
createOption(optionGroup, setting.getUiName(), setting.getFieldName());
}
initCustomOptions(optionGroup, groupName);
if (optionGroup.getComponents().length == 0)
return null;
return optionGroup;
}
Aggregations