当前位置: 首页>>代码示例>>Java>>正文


Java NonFocusableCheckBox.setEnabled方法代码示例

本文整理汇总了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);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:IntroduceFieldCentralPanel.java

示例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);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:44,代码来源:RenameDialog.java


注:本文中的com.intellij.ui.NonFocusableCheckBox.setEnabled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。