本文整理汇总了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;
}
示例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;
}
示例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();
}
示例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"));
}
示例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;
}
示例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;
}