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


Java NonFocusableCheckBox.setText方法代码示例

本文整理汇总了Java中com.intellij.ui.NonFocusableCheckBox.setText方法的典型用法代码示例。如果您正苦于以下问题:Java NonFocusableCheckBox.setText方法的具体用法?Java NonFocusableCheckBox.setText怎么用?Java NonFocusableCheckBox.setText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.ui.NonFocusableCheckBox的用法示例。


在下文中一共展示了NonFocusableCheckBox.setText方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ExtractMethodDialog

import com.intellij.ui.NonFocusableCheckBox; //导入方法依赖的package包/类
public ExtractMethodDialog(Project project,
                           PsiClass targetClass, final InputVariables inputVariables, PsiType returnType,
                           PsiTypeParameterList typeParameterList, PsiType[] exceptions, boolean isStatic, boolean canBeStatic,
                           final boolean canBeChainedConstructor,
                           String title,
                           String helpId,
                           Nullness nullness,
                           final PsiElement[] elementsToExtract) {
  super(project, true);
  myProject = project;
  myTargetClass = targetClass;
  myReturnType = returnType;
  myTypeParameterList = typeParameterList;
  myExceptions = exceptions;
  myStaticFlag = isStatic;
  myCanBeStatic = canBeStatic;
  myNullness = nullness;
  myElementsToExtract = elementsToExtract;
  myVariableData = inputVariables;
  myHelpId = helpId;
  mySignature = new MethodSignatureComponent("", project, JavaFileType.INSTANCE);
  mySignature.setPreferredSize(JBUI.size(500, 100));
  mySignature.setMinimumSize(JBUI.size(500, 100));
  setTitle(title);

  myNameField = new NameSuggestionsField(suggestMethodNames(), myProject);
  
  myMakeStatic = new NonFocusableCheckBox();
  myMakeStatic.setText(RefactoringBundle.message("declare.static.checkbox"));
  if (canBeChainedConstructor) {
    myCbChainedConstructor = new NonFocusableCheckBox(RefactoringBundle.message("extract.chained.constructor.checkbox"));
  }

  init();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:36,代码来源:ExtractMethodDialog.java

示例2: createOccurrencesCb

import com.intellij.ui.NonFocusableCheckBox; //导入方法依赖的package包/类
protected void createOccurrencesCb(GridBagConstraints gbConstraints, JPanel panel, final int occurenceNumber) {
  myCbReplaceAllOccurences = new NonFocusableCheckBox();
  myCbReplaceAllOccurences.setText(RefactoringBundle.message("replace.all.occurences", occurenceNumber));

  panel.add(myCbReplaceAllOccurences, gbConstraints);
  myCbReplaceAllOccurences.setSelected(false);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:IntroduceParameterSettingsUI.java

示例3: 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

示例4: ExtractMethodDialog

import com.intellij.ui.NonFocusableCheckBox; //导入方法依赖的package包/类
public ExtractMethodDialog(Project project,
                           PsiClass targetClass, final InputVariables inputVariables, PsiType returnType,
                           PsiTypeParameterList typeParameterList, PsiType[] exceptions, boolean isStatic, boolean canBeStatic,
                           final boolean canBeChainedConstructor,
                           String initialMethodName,
                           String title,
                           String helpId,
                           final PsiElement[] elementsToExtract) {
  super(project);
  myProject = project;
  myTargetClass = targetClass;
  myReturnType = returnType;
  myTypeParameterList = typeParameterList;
  myExceptions = exceptions;
  myStaticFlag = isStatic;
  myCanBeStatic = canBeStatic;
  myElementsToExtract = elementsToExtract;
  myVariableData = inputVariables;
  myHelpId = helpId;
  mySignature = new MethodSignatureComponent("", project, JavaFileType.INSTANCE);
  mySignature.setPreferredSize(new Dimension(500, 100));
  mySignature.setMinimumSize(new Dimension(500, 100));
  setTitle(title);

  // Create UI components

  myNameField = createNameField(initialMethodName);

  int height = myVariableData.getInputVariables().size() + 2;
  if (myExceptions.length > 0) {
    height += myExceptions.length + 1;
  }
  myMakeStatic = new NonFocusableCheckBox();
  myMakeStatic.setText(RefactoringBundle.message("declare.static.checkbox"));
  if (canBeChainedConstructor) {
    myCbChainedConstructor = new NonFocusableCheckBox(RefactoringBundle.message("extract.chained.constructor.checkbox"));
  }

  init();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:41,代码来源:ExtractMethodDialog.java

示例5: createCenterPanel

import com.intellij.ui.NonFocusableCheckBox; //导入方法依赖的package包/类
protected JComponent createCenterPanel() {
  JPanel panel = new JPanel(new GridBagLayout());
  GridBagConstraints gbConstraints = new GridBagConstraints();
  gbConstraints.fill = GridBagConstraints.HORIZONTAL;
  gbConstraints.weightx = 1;
  gbConstraints.weighty = 0;
  gbConstraints.gridwidth = 1;
  gbConstraints.gridx = 0;
  gbConstraints.gridy = 0;
  gbConstraints.insets = new Insets(0, 0, 0, 0);

  if (myOccurrencesCount > 1) {
    myCbReplaceAll = new NonFocusableCheckBox();
    myCbReplaceAll.setText(RefactoringBundle.message("replace.all.occurences", myOccurrencesCount));

    panel.add(myCbReplaceAll, gbConstraints);
    myReplaceAllListener = new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        updateControls();
      }
    };
    myCbReplaceAll.addItemListener(myReplaceAllListener);

    if (myAnyLValueOccurences) {
      myCbReplaceWrite = new StateRestoringCheckBox();
      myCbReplaceWrite.setText(RefactoringBundle.message("replace.write.access.occurrences"));
      gbConstraints.insets = new Insets(0, 8, 0, 0);
      gbConstraints.gridy++;
      panel.add(myCbReplaceWrite, gbConstraints);
      myCbReplaceWrite.addItemListener(myReplaceAllListener);
    }
  }

  myCbFinal = new NonFocusableCheckBox();
  myCbFinal.setText(RefactoringBundle.message("declare.final"));
  final Boolean createFinals = JavaRefactoringSettings.getInstance().INTRODUCE_LOCAL_CREATE_FINALS;
  myCbFinalState = createFinals == null ?
                   CodeStyleSettingsManager.getSettings(myProject).GENERATE_FINAL_LOCALS :
                   createFinals.booleanValue();

  gbConstraints.insets = new Insets(0, 0, 0, 0);
  gbConstraints.gridy++;
  panel.add(myCbFinal, gbConstraints);
  myFinalListener = new ItemListener() {
    public void itemStateChanged(ItemEvent e) {
      if (myCbFinal.isEnabled()) {
        myCbFinalState = myCbFinal.isSelected();
      }
    }
  };
  myCbFinal.addItemListener(myFinalListener);

  updateControls();

  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:57,代码来源:IntroduceVariableDialog.java

示例6: 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

示例7: ExtractMethodDialog

import com.intellij.ui.NonFocusableCheckBox; //导入方法依赖的package包/类
public ExtractMethodDialog(Project project,
		PsiClass targetClass,
		final InputVariables inputVariables,
		PsiType returnType,
		PsiTypeParameterList typeParameterList,
		PsiType[] exceptions,
		boolean isStatic,
		boolean canBeStatic,
		final boolean canBeChainedConstructor,
		String title,
		String helpId,
		Nullness nullness,
		final PsiElement[] elementsToExtract)
{
	super(project, true);
	myProject = project;
	myTargetClass = targetClass;
	myReturnType = returnType;
	myTypeParameterList = typeParameterList;
	myExceptions = exceptions;
	myStaticFlag = isStatic;
	myCanBeStatic = canBeStatic;
	myNullness = nullness;
	myElementsToExtract = elementsToExtract;
	myVariableData = inputVariables;
	myHelpId = helpId;
	mySignature = new MethodSignatureComponent("", project, JavaFileType.INSTANCE);
	mySignature.setPreferredSize(JBUI.size(500, 100));
	mySignature.setMinimumSize(JBUI.size(500, 100));
	setTitle(title);

	myNameField = new NameSuggestionsField(suggestMethodNames(), myProject);

	myMakeStatic = new NonFocusableCheckBox();
	myMakeStatic.setText(RefactoringBundle.message("declare.static.checkbox"));
	if(canBeChainedConstructor)
	{
		myCbChainedConstructor = new NonFocusableCheckBox(RefactoringBundle.message("extract.chained.constructor.checkbox"));
	}

	init();
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:43,代码来源:ExtractMethodDialog.java


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