本文整理汇总了Java中com.intellij.openapi.diff.impl.util.DiffDivider类的典型用法代码示例。如果您正苦于以下问题:Java DiffDivider类的具体用法?Java DiffDivider怎么用?Java DiffDivider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DiffDivider类属于com.intellij.openapi.diff.impl.util包,在下文中一共展示了DiffDivider类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: paintThis
import com.intellij.openapi.diff.impl.util.DiffDivider; //导入依赖的package包/类
private void paintThis(Graphics g) {
if (myEditor == null) return;
// painting only above the central scrollbar, because painting on edge scrollbars is not needed, and there are error stripes
if (myColumn != MergePanelColumn.BASE) return;
int offset = DiffDivider.MERGE_SCROLL_DIVIDER_POLYGONS_OFFSET;
ArrayList<DividerPolygon> polygons =
DividerPolygon.createVisiblePolygons(myMergePanel.getSecondEditingSide(), FragmentSide.SIDE1, offset);
for (DividerPolygon polygon : polygons) {
int startY = polygon.getTopLeftY();
int endY = polygon.getBottomLeftY();
int height = endY - startY;
if (height == 0) { // draw at least a one-pixel line (e.g. for insertion or deletion), as it is done in highlighters
height = 1;
}
drawPolygon((Graphics2D)g, startY, height, polygon.getColor(), polygon.isApplied());
}
}
示例2: paintThis
import com.intellij.openapi.diff.impl.util.DiffDivider; //导入依赖的package包/类
private void paintThis(Graphics g) {
if (myEditor != null) {
ArrayList<DividerPolygon> polygons = DividerPolygon.createVisiblePolygons(myMergePanel.getSecondEditingSide(), FragmentSide.SIDE1,
DiffDivider.MERGE_DIVIDER_POLYGONS_OFFSET);
for (DividerPolygon polygon : polygons) {
int startY = polygon.getTopLeftY();
int endY = polygon.getBottomLeftY();
int height = endY - startY;
if (height == 0) { // draw at least a one-pixel line (e.g. for insertion or deletion), as it is done in highlighters
height = 1;
}
drawPolygonAboveScrollBar((Graphics2D)g, startY, height, polygon.getColor(), polygon.isApplied());
}
}
}
示例3: paintThis
import com.intellij.openapi.diff.impl.util.DiffDivider; //导入依赖的package包/类
private void paintThis(Graphics g) {
if (myEditor == null) return;
// painting only above the central scrollbar, because painting on edge scrollbars is not needed, and there are error stripes
if (myColumn != MergePanelColumn.BASE) return;
int offset = DiffDivider.MERGE_SCROLL_DIVIDER_POLYGONS_OFFSET;
ArrayList<DividerPolygon> polygons =
DividerPolygon.createVisiblePolygons(myMergePanel.getSecondEditingSide(), FragmentSide.SIDE1, offset);
for (DividerPolygon polygon : polygons) {
int startY = polygon.getTopLeftY();
int endY = polygon.getBottomLeftY();
int height = endY - startY;
if (height == 0) { // draw at least a one-pixel line (e.g. for insertion or deletion), as it is done in highlighters
height = 1;
}
drawPolygon((Graphics2D)g, startY, height, polygon.getColor(), polygon.isApplied());
}
}