当前位置: 首页>>代码示例>>Java>>正文


Java DiffDivider类代码示例

本文整理汇总了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());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:EditorPlace.java

示例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());
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:EditorPlace.java

示例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());
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:EditorPlace.java


注:本文中的com.intellij.openapi.diff.impl.util.DiffDivider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。