本文整理匯總了Java中com.intellij.openapi.diff.impl.processing.HorizontalDiffSplitter類的典型用法代碼示例。如果您正苦於以下問題:Java HorizontalDiffSplitter類的具體用法?Java HorizontalDiffSplitter怎麽用?Java HorizontalDiffSplitter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
HorizontalDiffSplitter類屬於com.intellij.openapi.diff.impl.processing包,在下文中一共展示了HorizontalDiffSplitter類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: DiffPanelImpl
import com.intellij.openapi.diff.impl.processing.HorizontalDiffSplitter; //導入依賴的package包/類
public DiffPanelImpl(final Window owner,
@NotNull Project project,
boolean enableToolbar,
boolean horizontal,
int diffDividerPolygonsOffset,
DiffTool parentTool) {
myProject = project;
myIsHorizontal = horizontal;
myParentTool = parentTool;
myOptions = new DiffPanelOptions(this);
myPanel = new DiffPanelOuterComponent(TextDiffType.DIFF_TYPES, null);
myPanel.disableToolbar(!enableToolbar);
if (enableToolbar) myPanel.resetToolbar();
myOwnerWindow = owner;
myIsSyncScroll = true;
final boolean v = !horizontal;
myLeftSide = new DiffSideView(this, new CustomLineBorder(1, 0, v ? 0 : 1, v ? 0 : 1));
myRightSide = new DiffSideView(this, new CustomLineBorder(v ? 0 : 1, v ? 0 : 1, 1, 0));
myLeftSide.becomeMaster();
myDiffUpdater = new Rediffers(this);
myDiffDividerPolygonsOffset = diffDividerPolygonsOffset;
myData = createDiffPanelState(this);
if (horizontal) {
mySplitter = new DiffSplitter(myLeftSide.getComponent(), myRightSide.getComponent(),
new DiffDividerPaint(this, FragmentSide.SIDE1, diffDividerPolygonsOffset), myData);
}
else {
mySplitter = new HorizontalDiffSplitter(myLeftSide.getComponent(), myRightSide.getComponent());
}
myPanel.insertDiffComponent(mySplitter.getComponent(), new MyScrollingPanel());
myDataProvider = new MyGenericDataProvider(this);
myPanel.setDataProvider(myDataProvider);
ComparisonPolicy comparisonPolicy = getComparisonPolicy();
if (comparisonPolicy != DiffManagerImpl.getInstanceEx().getComparisonPolicy()) {
setComparisonPolicy(comparisonPolicy);
}
HighlightMode highlightMode = getHighlightMode();
if (highlightMode != DiffManagerImpl.getInstanceEx().getHighlightMode()) {
setHighlightMode(highlightMode);
}
myVisibleAreaListener = new VisibleAreaListener() {
@Override
public void visibleAreaChanged(VisibleAreaEvent e) {
Editor editor1 = getEditor1();
if (editor1 != null) {
editor1.getComponent().repaint();
}
Editor editor2 = getEditor2();
if (editor2 != null) {
editor2.getComponent().repaint();
}
}
};
registerActions();
}
示例2: DiffPanelImpl
import com.intellij.openapi.diff.impl.processing.HorizontalDiffSplitter; //導入依賴的package包/類
public DiffPanelImpl(final Window owner,
Project project,
boolean enableToolbar,
boolean horizontal,
int diffDividerPolygonsOffset,
DiffTool parentTool) {
myProject = project;
myIsHorizontal = horizontal;
myParentTool = parentTool;
myOptions = new DiffPanelOptions(this);
myPanel = new DiffPanelOuterComponent(TextDiffType.DIFF_TYPES, null);
myPanel.disableToolbar(!enableToolbar);
if (enableToolbar) myPanel.resetToolbar();
myOwnerWindow = owner;
myIsSyncScroll = true;
final boolean v = !horizontal;
myLeftSide = new DiffSideView(this, new CustomLineBorder(UIUtil.getBorderColor(), 1, 0, v ? 0 : 1, v ? 0 : 1));
myRightSide = new DiffSideView(this, new CustomLineBorder(UIUtil.getBorderColor(), v ? 0 : 1, v ? 0 : 1, 1, 0));
myLeftSide.becomeMaster();
myDiffUpdater = new Rediffers(this);
myData = createDiffPanelState(this);
if (horizontal) {
mySplitter = new DiffSplitter(myLeftSide.getComponent(), myRightSide.getComponent(),
new DiffDividerPaint(this, FragmentSide.SIDE1, diffDividerPolygonsOffset), myData);
}
else {
mySplitter = new HorizontalDiffSplitter(myLeftSide.getComponent(), myRightSide.getComponent());
}
myPanel.insertDiffComponent(mySplitter.getComponent(), new MyScrollingPanel());
myDataProvider = new MyGenericDataProvider(this);
myPanel.setDataProvider(myDataProvider);
final ComparisonPolicy comparisonPolicy = getComparisonPolicy();
final ComparisonPolicy defaultComparisonPolicy = DiffManagerImpl.getInstanceEx().getComparisonPolicy();
if (defaultComparisonPolicy != null && comparisonPolicy != defaultComparisonPolicy) {
setComparisonPolicy(defaultComparisonPolicy);
}
myVisibleAreaListener = new VisibleAreaListener() {
@Override
public void visibleAreaChanged(VisibleAreaEvent e) {
Editor editor1 = getEditor1();
if (editor1 != null) {
editor1.getComponent().repaint();
}
Editor editor2 = getEditor2();
if (editor2 != null) {
editor2.getComponent().repaint();
}
}
};
registerActions();
}
示例3: DiffPanelImpl
import com.intellij.openapi.diff.impl.processing.HorizontalDiffSplitter; //導入依賴的package包/類
public DiffPanelImpl(final Window owner, @Nonnull Project project, boolean enableToolbar, boolean horizontal, int diffDividerPolygonsOffset, DiffTool parentTool) {
myProject = project;
myIsHorizontal = horizontal;
myParentTool = parentTool;
myOptions = new DiffPanelOptions(this);
myPanel = new DiffPanelOuterComponent(TextDiffType.DIFF_TYPES, null);
myPanel.disableToolbar(!enableToolbar);
if (enableToolbar) myPanel.resetToolbar();
myOwnerWindow = owner;
myIsSyncScroll = true;
final boolean v = !horizontal;
myLeftSide = new DiffSideView(this, new CustomLineBorder(1, 0, v ? 0 : 1, v ? 0 : 1));
myRightSide = new DiffSideView(this, new CustomLineBorder(v ? 0 : 1, v ? 0 : 1, 1, 0));
myLeftSide.becomeMaster();
myDiffUpdater = new Rediffers(this);
myDiffDividerPolygonsOffset = diffDividerPolygonsOffset;
myData = createDiffPanelState(this);
if (horizontal) {
mySplitter = new DiffSplitter(myLeftSide.getComponent(), myRightSide.getComponent(), new DiffDividerPaint(this, FragmentSide.SIDE1, diffDividerPolygonsOffset), myData);
}
else {
mySplitter = new HorizontalDiffSplitter(myLeftSide.getComponent(), myRightSide.getComponent());
}
myPanel.insertDiffComponent(mySplitter.getComponent(), new MyScrollingPanel());
myDataProvider = new MyGenericDataProvider(this);
myPanel.setDataProvider(myDataProvider);
final ComparisonPolicy comparisonPolicy = getComparisonPolicy();
final ComparisonPolicy defaultComparisonPolicy = DiffManagerImpl.getInstanceEx().getComparisonPolicy();
final HighlightMode highlightMode = getHighlightMode();
final HighlightMode defaultHighlightMode = DiffManagerImpl.getInstanceEx().getHighlightMode();
if (defaultComparisonPolicy != null && comparisonPolicy != defaultComparisonPolicy) {
setComparisonPolicy(defaultComparisonPolicy);
}
if (defaultHighlightMode != null && highlightMode != defaultHighlightMode) {
setHighlightMode(defaultHighlightMode);
}
myVisibleAreaListener = new VisibleAreaListener() {
@Override
public void visibleAreaChanged(VisibleAreaEvent e) {
Editor editor1 = getEditor1();
if (editor1 != null) {
editor1.getComponent().repaint();
}
Editor editor2 = getEditor2();
if (editor2 != null) {
editor2.getComponent().repaint();
}
}
};
registerActions();
}