Java 类com.intellij.ui.TabbedPaneImpl 实例源码

项目:intellij-ce-playground    文件:GitCompareBranchesDialog.java   
public GitCompareBranchesDialog(@NotNull Project project,
                                @NotNull String branchName,
                                @NotNull String currentBranchName,
                                @NotNull GitCommitCompareInfo compareInfo,
                                @NotNull GitRepository initialRepo,
                                boolean dialog) {
  myProject = project;

  String rootString;
  if (compareInfo.getRepositories().size() == 1 && GitUtil.getRepositoryManager(myProject).moreThanOneRoot()) {
    rootString = " in root " + DvcsUtil.getShortRepositoryName(initialRepo);
  }
  else {
    rootString = "";
  }
  myTitle = String.format("Comparing %s with %s%s", currentBranchName, branchName, rootString);
  myMode = dialog ? Mode.MODAL : Mode.FRAME;

  JPanel diffPanel = new GitCompareBranchesDiffPanel(myProject, branchName, currentBranchName, compareInfo);
  myLogPanel = new GitCompareBranchesLogPanel(myProject, branchName, currentBranchName, compareInfo, initialRepo);

  myTabbedPane = new TabbedPaneImpl(SwingConstants.TOP);
  myTabbedPane.addTab("Log", VcsLogIcons.Branch, myLogPanel);
  myTabbedPane.addTab("Diff", AllIcons.Actions.Diff, diffPanel);
  myTabbedPane.setKeyboardNavigation(TabbedPaneImpl.DEFAULT_PREV_NEXT_SHORTCUTS);
}
项目:tools-idea    文件:GitCompareBranchesDialog.java   
@Override
protected JComponent createCenterPanel() {
  myLogPanel = new GitCompareBranchesLogPanel(myProject, myBranchName, myCurrentBranchName, myCompareInfo, myInitialRepo);
  JPanel diffPanel = new GitCompareBranchesDiffPanel(myProject, myBranchName, myCurrentBranchName, myCompareInfo);

  TabbedPaneImpl tabbedPane = new TabbedPaneImpl(SwingConstants.TOP);
  tabbedPane.addTab("Log", Git4ideaIcons.Branch, myLogPanel);
  tabbedPane.addTab("Diff", AllIcons.Actions.Diff, diffPanel);
  tabbedPane.setKeyboardNavigation(TabbedPaneImpl.DEFAULT_PREV_NEXT_SHORTCUTS);
  return tabbedPane;
}