本文整理汇总了Java中com.intellij.ui.NonFocusableCheckBox.setEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java NonFocusableCheckBox.setEnabled方法的具体用法?Java NonFocusableCheckBox.setEnabled怎么用?Java NonFocusableCheckBox.setEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.NonFocusableCheckBox
的用法示例。
在下文中一共展示了NonFocusableCheckBox.setEnabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: appendOccurrences
import com.intellij.ui.NonFocusableCheckBox; //导入方法依赖的package包/类
public void appendOccurrences(ItemListener itemListener, GridBagConstraints gbConstraints, JPanel panel) {
if (myOccurrencesCount > 1) {
myCbReplaceAll = new NonFocusableCheckBox();
myCbReplaceAll.setText(RefactoringBundle.message("replace.all.occurrences.of.expression.0.occurrences", myOccurrencesCount));
gbConstraints.gridy++;
panel.add(myCbReplaceAll, gbConstraints);
myCbReplaceAll.addItemListener(itemListener);
if (myIsInvokedOnDeclaration) {
myCbReplaceAll.setEnabled(false);
myCbReplaceAll.setSelected(true);
}
}
}
示例2: createCheckboxes
import com.intellij.ui.NonFocusableCheckBox; //导入方法依赖的package包/类
protected void createCheckboxes(JPanel panel, GridBagConstraints gbConstraints) {
gbConstraints.insets = new Insets(0, 0, 4, 0);
gbConstraints.gridwidth = 1;
gbConstraints.gridx = 0;
gbConstraints.weighty = 0;
gbConstraints.weightx = 1;
gbConstraints.fill = GridBagConstraints.BOTH;
myCbSearchInComments = new NonFocusableCheckBox();
myCbSearchInComments.setText(RefactoringBundle.getSearchInCommentsAndStringsText());
myCbSearchInComments.setSelected(true);
panel.add(myCbSearchInComments, gbConstraints);
gbConstraints.insets = new Insets(0, 0, 4, 0);
gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
gbConstraints.gridx = 1;
gbConstraints.weightx = 1;
gbConstraints.fill = GridBagConstraints.BOTH;
myCbSearchTextOccurences = new NonFocusableCheckBox();
myCbSearchTextOccurences.setText(RefactoringBundle.getSearchForTextOccurrencesText());
myCbSearchTextOccurences.setSelected(true);
panel.add(myCbSearchTextOccurences, gbConstraints);
if (!TextOccurrencesUtil.isSearchTextOccurencesEnabled(myPsiElement)) {
myCbSearchTextOccurences.setEnabled(false);
myCbSearchTextOccurences.setSelected(false);
myCbSearchTextOccurences.setVisible(false);
}
for(AutomaticRenamerFactory factory: Extensions.getExtensions(AutomaticRenamerFactory.EP_NAME)) {
if (factory.isApplicable(myPsiElement) && factory.getOptionName() != null) {
gbConstraints.insets = new Insets(0, 0, 4, 0);
gbConstraints.gridwidth = myAutomaticRenamers.size() % 2 == 0 ? 1 : GridBagConstraints.REMAINDER;
gbConstraints.gridx = myAutomaticRenamers.size() % 2;
gbConstraints.weightx = 1;
gbConstraints.fill = GridBagConstraints.BOTH;
JCheckBox checkBox = new NonFocusableCheckBox();
checkBox.setText(factory.getOptionName());
checkBox.setSelected(factory.isEnabled());
panel.add(checkBox, gbConstraints);
myAutomaticRenamers.put(factory, checkBox);
}
}
}