gpt4 book ai didi

com.ait.lienzo.client.core.shape.wires.WiresShape.getY()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 10:51:05 25 4
gpt4 key购买 nike

本文整理了Java中com.ait.lienzo.client.core.shape.wires.WiresShape.getY()方法的一些代码示例,展示了WiresShape.getY()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WiresShape.getY()方法的具体详情如下:
包路径:com.ait.lienzo.client.core.shape.wires.WiresShape
类名称:WiresShape
方法名:getY

WiresShape.getY介绍

暂无

代码示例

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Test
public void checkLayout() {
  assertEquals(VerticalStackLayoutManager.PADDING_Y,
         shapes.get(0).getY(),
         0.0);
  assertEquals(VerticalStackLayoutManager.PADDING_Y * 2,
         shapes.get(1).getY(),
         0.0);
  assertEquals(VerticalStackLayoutManager.PADDING_Y * 3,
         shapes.get(2).getY(),
         0.0);
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Override
protected void orderChildren(final WiresShape wiresShape,
               final WiresContainer container,
               final Point2D mouseRelativeLoc) {
  if (container == null) {
    return;
  }
  CaseManagementShapeView shape = (CaseManagementShapeView) wiresShape;
  final NFastArrayList<WiresShape> nChildren = container.getChildShapes().copy();
  final List<WiresShape> children = nChildren.remove(shape).toList();
  int targetIndex = children.size();
  final double my = mouseRelativeLoc.getY();
  for (int idx = 0; idx < children.size(); idx++) {
    final WiresShape child = children.get(idx);
    if (my < child.getY()) {
      targetIndex = idx;
      break;
    }
  }
  if (container instanceof CaseManagementShapeView) {
    final int currentIndex = ((CaseManagementShapeView) container).getIndex(shape);
    if (currentIndex != targetIndex) {
      ((CaseManagementShapeView) container).addShape(shape,
                              targetIndex);
    }
  }
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Test
public void orderChildrenInsertShape1At2() {
  //Mouse Y needs to be after target index Y as insertion happens when Shape is dragged after target
  addShapeAtIndex(shapes.get(1),
          shapes.get(2).getY() + PADDING);
  assertChildrenOrder(new Check(0,
                 0),
            new Check(1,
                 2),
            new Check(2,
                 1));
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Test
public void orderChildrenInsertShape0At0() {
  //Mouse Y needs to be before target index Y as insertion happens when Shape is dragged before target
  addShapeAtIndex(shapes.get(0),
          shapes.get(0).getY() - PADDING);
  assertChildrenOrder(new Check(0,
                 0),
            new Check(1,
                 1),
            new Check(2,
                 2));
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Test
public void orderChildrenInsertShape0At1() {
  //Mouse Y needs to be after target index Y as insertion happens when Shape is dragged after target
  addShapeAtIndex(shapes.get(0),
          shapes.get(1).getY() + PADDING);
  assertChildrenOrder(new Check(0,
                 1),
            new Check(1,
                 0),
            new Check(2,
                 2));
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Test
public void orderChildrenInsertShape0At2() {
  //Mouse Y needs to be after target index Y as insertion happens when Shape is dragged after target
  addShapeAtIndex(shapes.get(0),
          shapes.get(2).getY() + PADDING);
  assertChildrenOrder(new Check(0,
                 2),
            new Check(1,
                 0),
            new Check(2,
                 1));
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Test
public void orderChildrenInsertShape2At1() {
  //Mouse Y needs to be before target index Y as insertion happens when Shape is dragged before target
  addShapeAtIndex(shapes.get(2),
          shapes.get(1).getY() - PADDING);
  assertChildrenOrder(new Check(0,
                 0),
            new Check(1,
                 2),
            new Check(2,
                 1));
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Test
public void orderChildrenInsertShape1At0() {
  //Mouse Y needs to be before target index Y as insertion happens when Shape is dragged before target
  addShapeAtIndex(shapes.get(1),
          shapes.get(0).getY() - PADDING);
  assertChildrenOrder(new Check(0,
                 1),
            new Check(1,
                 0),
            new Check(2,
                 2));
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Test
public void orderChildrenInsertShape1At1() {
  //Mouse Y needs to be after target index Y as insertion happens when Shape is dragged after target
  addShapeAtIndex(shapes.get(1),
          shapes.get(1).getY() + PADDING);
  assertChildrenOrder(new Check(0,
                 0),
            new Check(1,
                 1),
            new Check(2,
                 2));
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Test
public void orderChildrenInsertShape2At0() {
  //Mouse Y needs to be before target index Y as insertion happens when Shape is dragged before target
  addShapeAtIndex(shapes.get(2),
          shapes.get(0).getY() - PADDING);
  assertChildrenOrder(new Check(0,
                 1),
            new Check(1,
                 2),
            new Check(2,
                 0));
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Test
public void orderChildrenInsertShape2At2() {
  //Mouse Y needs to be after target index Y as insertion happens when Shape is dragged after target
  addShapeAtIndex(shapes.get(2),
          shapes.get(2).getY() + PADDING);
  assertChildrenOrder(new Check(0,
                 0),
            new Check(1,
                 1),
            new Check(2,
                 2));
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com