use of git4idea.ui.GitCommitListPanel in project intellij-community by JetBrains.
the class GitCompareBranchesLogPanel method createCenterPanel.
private JComponent createCenterPanel() {
final ChangesBrowser changesBrowser = new ChangesBrowser(myProject, null, Collections.<Change>emptyList(), null, false, true, null, ChangesBrowser.MyUseCase.COMMITTED_CHANGES, null);
myHeadToBranchListPanel = new GitCommitListPanel(getHeadToBranchCommits(myInitialRepo), String.format("Branch %s is fully merged to %s", myBranchName, myCurrentBranchName));
myBranchToHeadListPanel = new GitCommitListPanel(getBranchToHeadCommits(myInitialRepo), String.format("Branch %s is fully merged to %s", myCurrentBranchName, myBranchName));
addSelectionListener(myHeadToBranchListPanel, myBranchToHeadListPanel, changesBrowser);
addSelectionListener(myBranchToHeadListPanel, myHeadToBranchListPanel, changesBrowser);
myHeadToBranchListPanel.registerDiffAction(changesBrowser.getDiffAction());
myBranchToHeadListPanel.registerDiffAction(changesBrowser.getDiffAction());
JPanel htb = layoutCommitListPanel(myCurrentBranchName, true);
JPanel bth = layoutCommitListPanel(myCurrentBranchName, false);
JPanel listPanel = null;
switch(getInfoType()) {
case HEAD_TO_BRANCH:
listPanel = htb;
break;
case BRANCH_TO_HEAD:
listPanel = bth;
break;
case BOTH:
Splitter lists = new Splitter(true, 0.5f);
lists.setFirstComponent(htb);
lists.setSecondComponent(bth);
listPanel = lists;
}
Splitter rootPanel = new Splitter(false, 0.7f);
rootPanel.setSecondComponent(changesBrowser);
rootPanel.setFirstComponent(listPanel);
return rootPanel;
}
Aggregations