本文整理汇总了Java中com.intellij.ui.components.JBCheckBox.setSelected方法的典型用法代码示例。如果您正苦于以下问题:Java JBCheckBox.setSelected方法的具体用法?Java JBCheckBox.setSelected怎么用?Java JBCheckBox.setSelected使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.components.JBCheckBox
的用法示例。
在下文中一共展示了JBCheckBox.setSelected方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reset
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
@Override
public void reset() {
EmmetOptions emmetOptions = EmmetOptions.getInstance();
myEnableEmmetJBCheckBox.setSelected(emmetOptions.isEmmetEnabled());
myEnablePreviewJBCheckBox.setEnabled(emmetOptions.isEmmetEnabled());
myEnablePreviewJBCheckBox.setSelected(emmetOptions.isPreviewEnabled());
myEnableHrefAutodetectJBCheckBox.setEnabled(emmetOptions.isEmmetEnabled());
myEnableHrefAutodetectJBCheckBox.setSelected(emmetOptions.isHrefAutoDetectEnabled());
myAddEditPointAtTheEndOfTemplateJBCheckBox.setSelected(emmetOptions.isAddEditPointAtTheEndOfTemplate());
Set<String> enabledByDefault = emmetOptions.getFiltersEnabledByDefault();
for (ZenCodingFilter filter : ZenCodingFilter.getInstances()) {
final String filterSuffix = filter.getSuffix();
final JBCheckBox checkBox = myFilterCheckboxes.get(filterSuffix);
if (checkBox != null) {
checkBox.setEnabled(emmetOptions.isEmmetEnabled());
checkBox.setSelected(enabledByDefault.contains(filterSuffix));
}
}
}
示例2: setCurrentValuesToControls
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
private void setCurrentValuesToControls() {
myModules.fillModules(config.getProject(), JavaModuleType.getModuleType());
myVMParameters.getComponent().setText(configurationValues.getVmArgs());
myModules.setSelectedModule(config.getModule());
myEquinoxMainClass.setText(configurationValues.getMainClass());
myApplicationName.setText(configurationValues.getApplicationName());
for (JBCheckBox jb : launchConfigOptions) {
if (configurationValues.getEnabledConfigs().contains(optionMapping.get(jb))) {
jb.setSelected(true);
}
}
myAutomaticDiagnostic.setSelected(configurationValues.isAutoDiagnostic());
myUrl.setText(configurationValues.getDiagnosticUrl());
myUser.setText(configurationValues.getDiagnosticUsername());
myPassword.setText(configurationValues.getDiagnosticPassword());
}
示例3: createUIComponents
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
private void createUIComponents() {
List<Language> languages = getBaseLanguagesWithProviders();
Language selected = myInitiallySelectedLanguage;
if (selected == null) {
selected = languages.get(0);
}
String text = getLanguageBlackList(selected);
myEditorTextField = createEditor(text, myNewPreselectedItem);
myEditorTextField.addDocumentListener(new DocumentAdapter() {
@Override
public void documentChanged(DocumentEvent e) {
updateOkEnabled();
}
});
myDoNotShowIfParameterNameContainedInMethodName = new JBCheckBox();
myShowWhenMultipleParamsWithSameType = new JBCheckBox();
ParameterNameHintsSettings settings = ParameterNameHintsSettings.getInstance();
myDoNotShowIfParameterNameContainedInMethodName.setSelected(settings.isDoNotShowIfMethodNameContainsParameterName());
myShowWhenMultipleParamsWithSameType.setSelected(settings.isShowForParamsWithSameType());
initLanguageCombo(languages, selected);
}
示例4: getOptionsPanel
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
@NotNull
private JPanel getOptionsPanel() {
// isEnabled
cbEnabled = new JBCheckBox();
cbEnabled.setSelected(directory.isEnabled());
cbEnabled.addItemListener(e -> setEnabled(cbEnabled.isSelected()));
cbEnabled.setToolTipText(Localizer.get("tooltip.IfCheckedElementWillBeCreated"));
// Script
jlScript = new IconLabel(
Localizer.get("tooltip.ColoredWhenItemHasScript"),
PluginIcons.SCRIPT,
PluginIcons.SCRIPT_DISABLED
);
// CustomPath
jlCustomPath = new IconLabel(
Localizer.get("tooltip.ColoredWhenItemHasCustomPath"),
PluginIcons.CUSTOM_PATH,
PluginIcons.CUSTOM_PATH_DISABLED
);
// WriteRules
jlWriteRules = new IconLabelCustom<Directory>(Localizer.get("tooltip.WriteRules"), directory) {
@Override
public void onUpdateIcon(Directory item) {
setIcon(item.getWriteRules().toIcon());
}
};
updateOptionIcons();
JPanel optionsPanel = new JPanel(new MigLayout(new LC().insets("0").gridGap("2pt","0")));
optionsPanel.add(cbEnabled, new CC());
optionsPanel.add(jlScript, new CC());
optionsPanel.add(jlCustomPath, new CC());
optionsPanel.add(jlWriteRules, new CC());
return optionsPanel;
}
示例5: getOptionsPanel
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
@NotNull
private JPanel getOptionsPanel() {
JPanel optionsPanel = new JPanel(new MigLayout(new LC().insets("0").gridGap("2pt","0")));
cbEnabled = new JBCheckBox();
cbEnabled.setSelected(file.isEnabled());
cbEnabled.addItemListener(e -> setEnabled(cbEnabled.isSelected()));
cbEnabled.setToolTipText(Localizer.get("tooltip.IfCheckedElementWillBeCreated"));
// Script
jlScript = new IconLabel(
Localizer.get("tooltip.ColoredWhenItemHasScript"),
PluginIcons.SCRIPT,
PluginIcons.SCRIPT_DISABLED
);
// CustomPath
jlCustomPath = new IconLabel(
Localizer.get("tooltip.ColoredWhenItemHasCustomPath"),
PluginIcons.CUSTOM_PATH,
PluginIcons.CUSTOM_PATH_DISABLED
);
// WriteRules
jlWriteRules = new IconLabelCustom<File>(Localizer.get("tooltip.WriteRules"), file) {
@Override
public void onUpdateIcon(File item) {
setIcon(item.getWriteRules().toIcon());
}
};
updateOptionIcons();
optionsPanel.add(cbEnabled, new CC());
optionsPanel.add(jlScript, new CC());
optionsPanel.add(jlCustomPath, new CC());
optionsPanel.add(jlWriteRules, new CC());
return optionsPanel;
}
示例6: testShouldChangeStateOfRealTimeEndpointValidationCatalogCheckBox
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
public void testShouldChangeStateOfRealTimeEndpointValidationCatalogCheckBox() throws ConfigurationException {
JBCheckBox checkBox = editorSettingsPage.getRealTimeEndpointValidationCatalogCheckBox();
assertEquals(true, checkBox.isSelected());
assertEquals(true, editorSettingsPage.getCamelPreferenceService().isRealTimeEndpointValidation());
checkBox.setSelected(false);
editorSettingsPage.apply();
assertEquals(false, checkBox.isSelected());
assertEquals(false, editorSettingsPage.getCamelPreferenceService().isRealTimeEndpointValidation());
}
示例7: testShouldChangeStateOfRealTimeSimpleValidationCatalogCheckBox
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
public void testShouldChangeStateOfRealTimeSimpleValidationCatalogCheckBox() throws ConfigurationException {
JBCheckBox checkBox = editorSettingsPage.getRealTimeSimpleValidationCatalogCheckBox();
assertEquals(true, checkBox.isSelected());
assertEquals(true, editorSettingsPage.getCamelPreferenceService().isRealTimeSimpleValidation());
checkBox.setSelected(false);
editorSettingsPage.apply();
assertEquals(false, checkBox.isSelected());
assertEquals(false, editorSettingsPage.getCamelPreferenceService().isRealTimeSimpleValidation());
}
示例8: testShouldChangeStateOfHighlightCustomOptionsCheckBox
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
public void testShouldChangeStateOfHighlightCustomOptionsCheckBox() throws ConfigurationException {
JBCheckBox checkBox = editorSettingsPage.getHighlightCustomOptionsCheckBox();
assertEquals(true, checkBox.isSelected());
assertEquals(true, editorSettingsPage.getCamelPreferenceService().isHighlightCustomOptions());
checkBox.setSelected(false);
editorSettingsPage.apply();
assertEquals(false, checkBox.isSelected());
assertEquals(false, editorSettingsPage.getCamelPreferenceService().isHighlightCustomOptions());
}
示例9: testShouldRestRealTimeSimpleValidationCatalogCheckBox
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
public void testShouldRestRealTimeSimpleValidationCatalogCheckBox() {
JBCheckBox checkBox = editorSettingsPage.getRealTimeSimpleValidationCatalogCheckBox();
boolean status = checkBox.isSelected();
checkBox.setSelected(!status);
editorSettingsPage.reset();
assertEquals(status, checkBox.isSelected());
}
示例10: testShouldResetHighlightCustomOptionsCheckBox
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
public void testShouldResetHighlightCustomOptionsCheckBox() {
JBCheckBox checkBox = editorSettingsPage.getHighlightCustomOptionsCheckBox();
boolean status = checkBox.isSelected();
checkBox.setSelected(!status);
editorSettingsPage.reset();
assertEquals(status, checkBox.isSelected());
}
示例11: setupDialog
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
void setupDialog(Project project, final List<Sdk> allSdks) {
myProject = project;
final GridBagLayout layout = new GridBagLayout();
myMainPanel = new JPanel(layout);
myName = new JTextField();
myDestination = new TextFieldWithBrowseButton();
myMakeAvailableToAllProjectsCheckbox = new JBCheckBox(PyBundle.message("sdk.create.venv.dialog.make.available.to.all.projects"));
if (project == null || project.isDefault() || !PlatformUtils.isPyCharm()) {
myMakeAvailableToAllProjectsCheckbox.setSelected(true);
myMakeAvailableToAllProjectsCheckbox.setVisible(false);
}
layoutPanel(allSdks);
init();
setOKActionEnabled(false);
registerValidators(new FacetValidatorsManager() {
public void registerValidator(FacetEditorValidator validator, JComponent... componentsToWatch) {
}
public void validate() {
checkValid();
}
});
myMainPanel.setPreferredSize(new Dimension(300, 50));
checkValid();
setInitialDestination();
addUpdater(myName);
new LocationNameFieldsBinding(project, myDestination, myName, myInitialPath, PyBundle.message("sdk.create.venv.dialog.select.venv.location"));
}
示例12: GitPushTagPanel
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
public GitPushTagPanel(@Nullable GitPushTagMode defaultMode, boolean followTagsSupported) {
String checkboxText = "Push Tags";
if (followTagsSupported) {
checkboxText += ": ";
}
myCheckBox = new JBCheckBox(checkboxText);
myCheckBox.setMnemonic('T');
myCheckBox.setSelected(defaultMode != null);
setLayout(new BorderLayout());
add(myCheckBox, BorderLayout.WEST);
if (followTagsSupported) {
myCombobox = new ComboBox(GitPushTagMode.getValues());
myCombobox.setRenderer(new ListCellRendererWrapper<GitPushTagMode>() {
@Override
public void customize(JList list, GitPushTagMode value, int index, boolean selected, boolean hasFocus) {
setText(value.getTitle());
}
});
myCombobox.setEnabled(myCheckBox.isSelected());
if (defaultMode != null) {
myCombobox.setSelectedItem(defaultMode);
}
myCheckBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(@NotNull ActionEvent e) {
myCombobox.setEnabled(myCheckBox.isSelected());
}
});
add(myCombobox, BorderLayout.CENTER);
}
else {
myCombobox = null;
}
}
示例13: testShouldResetRealTimeEndpointValidationCatalogCheckBox
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
public void testShouldResetRealTimeEndpointValidationCatalogCheckBox() {
JBCheckBox checkBox = editorSettingsPage.getRealTimeEndpointValidationCatalogCheckBox();
checkBox.setSelected(false);
editorSettingsPage.reset();
assertTrue(checkBox.isSelected());
}
示例14: testShouldDownloadCatalogCheckBox
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
public void testShouldDownloadCatalogCheckBox() {
JBCheckBox checkBox = editorSettingsPage.getDownloadCatalogCheckBox();
checkBox.setSelected(false);
editorSettingsPage.reset();
assertTrue(checkBox.isSelected());
}
示例15: testShouldResetScanThirdPartyComponentsCatalogCheckBox
import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
public void testShouldResetScanThirdPartyComponentsCatalogCheckBox() {
JBCheckBox checkBox = editorSettingsPage.getScanThirdPartyComponentsCatalogCheckBox();
checkBox.setSelected(false);
editorSettingsPage.reset();
assertTrue(checkBox.isSelected());
}