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


Java JavaVisibilityPanel类代码示例

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


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

示例1: createCenterPanel

import com.intellij.refactoring.ui.JavaVisibilityPanel; //导入依赖的package包/类
protected JComponent createCenterPanel() {
  JPanel panel = new JPanel(new BorderLayout());
  final String title = RefactoringBundle.message("move.members.members.to.be.moved.border.title");
  final MemberSelectionPanel selectionPanel = new MemberSelectionPanel(title, myMemberInfos, null);
  myTable = selectionPanel.getTable();
  myMemberInfoModel = new MyMemberInfoModel();
  myMemberInfoModel.memberInfoChanged(new MemberInfoChange<PsiMember, MemberInfo>(myMemberInfos));
  selectionPanel.getTable().setMemberInfoModel(myMemberInfoModel);
  selectionPanel.getTable().addMemberInfoChangeListener(myMemberInfoModel);
  panel.add(selectionPanel, BorderLayout.CENTER);

  myVisibilityPanel = new JavaVisibilityPanel(true, true);
  myVisibilityPanel.setVisibility(null);
  panel.add(myVisibilityPanel, BorderLayout.EAST);
  panel.add(initOpenInEditorCb(), BorderLayout.SOUTH);

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

示例2: createCenterPanel

import com.intellij.refactoring.ui.JavaVisibilityPanel; //导入依赖的package包/类
protected JComponent createCenterPanel() {
  JPanel panel = new JPanel(new BorderLayout());
  final String title = RefactoringBundle.message("move.members.members.to.be.moved.border.title");
  final MemberSelectionPanel selectionPanel = new MemberSelectionPanel(title, myMemberInfos, null);
  myTable = selectionPanel.getTable();
  myMemberInfoModel = new MyMemberInfoModel();
  myMemberInfoModel.memberInfoChanged(new MemberInfoChange<PsiMember, MemberInfo>(myMemberInfos));
  selectionPanel.getTable().setMemberInfoModel(myMemberInfoModel);
  selectionPanel.getTable().addMemberInfoChangeListener(myMemberInfoModel);
  panel.add(selectionPanel, BorderLayout.CENTER);

  myVisibilityPanel = new JavaVisibilityPanel(true, true);
  myVisibilityPanel.setVisibility(null);
  panel.add(myVisibilityPanel, BorderLayout.EAST);

  return panel;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:MoveMembersDialog.java

示例3: IntroduceConstantDialog

import com.intellij.refactoring.ui.JavaVisibilityPanel; //导入依赖的package包/类
IntroduceConstantDialog(Project project,
                        PsiClass parentClass,
                        PsiExpression initializerExpression,
                        PsiLocalVariable localVariable,
                        boolean isInvokedOnDeclaration,
                        PsiExpression[] occurrences,
                        PsiClass targetClass,
                        TypeSelectorManager typeSelectorManager, String enteredName) {
  super(project, true);
  myProject = project;
  myParentClass = parentClass;
  myInitializerExpression = initializerExpression;
  myLocalVariable = localVariable;
  myInvokedOnDeclaration = isInvokedOnDeclaration;
  myOccurrences = occurrences;
  myEnteredName = enteredName;
  myOccurrencesCount = occurrences.length;
  myTargetClass = targetClass;
  myTypeSelectorManager = typeSelectorManager;
  myDestinationClass = null;

  setTitle(IntroduceConstantHandler.REFACTORING_NAME);
  myCodeStyleManager = JavaCodeStyleManager.getInstance(myProject);
  myVPanel = new JavaVisibilityPanel(false, true);
  myVisibilityPanel.add(myVPanel, BorderLayout.CENTER);
  init();

  myVPanel.setVisibility(JavaRefactoringSettings.getInstance().INTRODUCE_CONSTANT_VISIBILITY);
  myIntroduceEnumConstantCb.setEnabled(isSuitableForEnumConstant());
  updateVisibilityPanel();
  updateButtons();
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:33,代码来源:IntroduceConstantDialog.java

示例4: CodeStyleGenerationConfigurable

import com.intellij.refactoring.ui.JavaVisibilityPanel; //导入依赖的package包/类
public CodeStyleGenerationConfigurable(CodeStyleSettings settings) {
  mySettings = settings;
  myMembersOrderList = new MembersOrderList();
  myPanel.setBorder(IdeBorderFactory.createEmptyBorder(2, 2, 2, 2));
  myJavaVisibilityPanel = new JavaVisibilityPanel(false, true, RefactoringBundle.message("default.visibility.border.title"));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:CodeStyleGenerationConfigurable.java

示例5: createVisibilityPanel

import com.intellij.refactoring.ui.JavaVisibilityPanel; //导入依赖的package包/类
protected static JavaVisibilityPanel createVisibilityPanel() {
  final JavaVisibilityPanel visibilityPanel = new JavaVisibilityPanel(false, true);
  visibilityPanel.setVisibility(null);
  return visibilityPanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:MoveInstanceMethodDialogBase.java

示例6: createInitializerPlacePanel

import com.intellij.refactoring.ui.JavaVisibilityPanel; //导入依赖的package包/类
protected JComponent createInitializerPlacePanel(ItemListener itemListener, ItemListener finalUpdater) {
    JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new BorderLayout());

    JPanel initializationPanel = new JPanel();
    initializationPanel.setBorder(IdeBorderFactory.createTitledBorder(RefactoringBundle.message("initialize.in.border.title"),
                                                                      true));
    initializationPanel.setLayout(new BoxLayout(initializationPanel, BoxLayout.Y_AXIS));


    myRbInCurrentMethod = new JRadioButton();
    myRbInCurrentMethod.setFocusable(false);
    myRbInCurrentMethod.setText(RefactoringBundle.message("current.method.radio"));
    myRbInCurrentMethod.setEnabled(myAllowInitInMethod);

    myRbInFieldDeclaration = new JRadioButton();
    myRbInFieldDeclaration.setFocusable(false);
    myRbInFieldDeclaration.setText(RefactoringBundle.message("field.declaration.radio"));

    myRbInConstructor = new JRadioButton();
    myRbInConstructor.setFocusable(false);
    myRbInConstructor.setText(RefactoringBundle.message("class.constructors.radio"));



    initializationPanel.add(myRbInCurrentMethod);
    initializationPanel.add(myRbInFieldDeclaration);
    initializationPanel.add(myRbInConstructor);

    if (TestFrameworks.getInstance().isTestClass(myParentClass)) {
      myRbInSetUp = new JRadioButton();
      myRbInSetUp.setFocusable(false);
      myRbInSetUp.setText(RefactoringBundle.message("setup.method.radio"));
      initializationPanel.add(myRbInSetUp);
    }

    ButtonGroup bg = new ButtonGroup();
    bg.add(myRbInCurrentMethod);
    bg.add(myRbInFieldDeclaration);
    bg.add(myRbInConstructor);
    if (myRbInSetUp != null) bg.add(myRbInSetUp);

    myRbInConstructor.addItemListener(itemListener);
    myRbInCurrentMethod.addItemListener(itemListener);
    myRbInFieldDeclaration.addItemListener(itemListener);
    myRbInConstructor.addItemListener(finalUpdater);
    myRbInCurrentMethod.addItemListener(finalUpdater);
    myRbInFieldDeclaration.addItemListener(finalUpdater);
    if (myRbInSetUp != null) myRbInSetUp.addItemListener(finalUpdater);

//    modifiersPanel.add(myCbFinal);
//    modifiersPanel.add(myCbStatic);

    JPanel groupPanel = new JPanel(new GridLayout(1, 2));
    groupPanel.add(initializationPanel);

    myVisibilityPanel = new JavaVisibilityPanel(false, false);
    groupPanel.add(myVisibilityPanel);

    mainPanel.add(groupPanel, BorderLayout.CENTER);

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


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