gpt4 book ai didi

com.ait.lienzo.client.core.shape.wires.WiresShape类的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 12:19:05 28 4
gpt4 key购买 nike

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

WiresShape介绍

暂无

代码示例

代码示例来源:origin: com.ahome-it/lienzo-core

@Override
public void dock(final WiresShape shape, final WiresContainer parent, final Point2D absLocation)
  if (null != shape.getDockedTo())
    undock(shape, shape.getDockedTo());
  shape.setLocation(relLocation);
  shape.shapeMoved();
  shape.removeFromParent();
  parent.add(shape);
  shape.setDockedTo(parent);
    throw new IllegalStateException("Cannot dock shape " + shape.uuid() + " there are no availabe dock points");
    shape.setLocation(newAbsLocation.sub(parent.getComputedLocation()));
    shape.shapeMoved();
  m_handlerRegistrations.add(parentWireShape.addWiresResizeStepHandler(new WiresResizeStepHandler()

代码示例来源:origin: com.ahome-it/lienzo-core

private MultiPath getPath()
{
  return m_wires_shape.getPath();
}

代码示例来源:origin: com.ahome-it/lienzo-core

private Group getGroup()
  {
    return m_wires_shape.getGroup();
  }
}

代码示例来源:origin: com.ahome-it/lienzo-core

@Override
  public void onShapeResizeStep(final WiresResizeStepEvent event)
  {
    final WiresMagnet currentMagnet = parentWireShape.getMagnets().getMagnet(magnet.getIndex());
    shape.setLocation(calculateAbsCandidateLocation(shape, currentMagnet));
    shape.shapeMoved();
  }
}));

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo-extensions

private void initHandlers(final WiresShape shape) {
  registrations.register(
      shape.addWiresMoveHandler(this::onMove)
  );
  registrations.register(
      shape.addWiresDragStartHandler(this::onMove)
  );
  registrations.register(
      shape.addWiresDragMoveHandler(this::onMove)
  );
  registrations.register(
      shape.addWiresDragEndHandler(this::onMove)
  );
  registrations.register(
      shape.addWiresResizeStartHandler(this::onResize)
  );
  registrations.register(
      shape.addWiresResizeStepHandler(this::onResize)
  );
  registrations.register(
      shape.addWiresResizeEndHandler(this::onResize)
  );
}

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

private double getTotalHeight(WiresShape ws) {
    double height = ws.getPath().getBoundingBox().getHeight();

    for (WiresShape child : ws.getChildShapes()) {
      height += (getTotalHeight(child) + PADDING_Y);
    }

    return height;
  }
}

代码示例来源:origin: com.ahome-it/lienzo-core

m_registrationManager.register(m_wires_shape.addWiresDragStartHandler(new WiresDragStartHandler()
m_registrationManager.register(m_wires_shape.addWiresDragMoveHandler(new WiresDragMoveHandler()
m_registrationManager.register(m_wires_shape.addWiresDragEndHandler(new WiresDragEndHandler()
m_registrationManager.register(m_wires_shape.addWiresMoveHandler(new WiresMoveHandler()

代码示例来源:origin: com.ahome-it/lienzo-core

private WiresManager getWiresManager()
{
  return getShape().getWiresManager();
}

代码示例来源:origin: com.ahome-it/lienzo-core

shapes.iterator().next().getWiresManager();
  if (!shape.getControl().onMoveComplete())

代码示例来源:origin: com.ahome-it/lienzo-core

@Override
public void setShapeLocation(final Point2D location)
{
  getShape().setLocation(location);
}

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

@Override
  public void layout(final WiresContainer container) {
    double x = LEFT_MARGIN_PADDING;
    for (WiresShape ws : container.getChildShapes()) {
      ws.setLocation(new Point2D(x,
                    PADDING_Y));
      x = x + ws.getPath().getBoundingBox().getWidth() + PADDING_X;
    }
  }
}

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

public WiresLayer dock(final WiresContainer parent,
            final WiresShape child) {
  final WiresDockingControl dockingControl = child.getControl().getDockingControl();
  dockingControl.dock(parent);
  final Point2D candidateLocation = dockingControl.getCandidateLocation();
  if (null != candidateLocation) {
    child.setLocation(candidateLocation);
  }
  return this;
}

代码示例来源:origin: ahome-it/lienzo-core

public WiresShapeControl register(final WiresShape shape, final boolean addIntoIndex)
{
  shape.setWiresManager(this);
  final WiresShapeHandler handler = getWiresHandlerFactory().newShapeHandler(getControlFactory().newShapeControl(shape, this),
                                        getControlFactory().newShapeHighlight(this),
                                        this);
  if (addIntoIndex)
  {
    // Shapes added to the align and distribute index.
    handler.getControl().setAlignAndDistributeControl(addToIndex(shape));
    shape.addWiresResizeEndHandler(new WiresResizeEndHandler()
    {
      @Override
      public void onShapeResizeEnd(final WiresResizeEndEvent event)
      {
        removeFromIndex(shape);
        handler.getControl().setAlignAndDistributeControl(addToIndex(shape));
      }
    });
  }
  final HandlerRegistrationManager registrationManager = createHandlerRegistrationManager();
  setWiresShapeHandler(shape, registrationManager, handler);
  // Shapes added to the canvas layer by default.
  getLayer().add(shape);
  final String uuid = shape.uuid();
  m_shapesMap.put(uuid, shape);
  m_shapeHandlersMap.put(uuid, registrationManager);
  return handler.getControl();
}

代码示例来源:origin: com.ahome-it/lienzo-core

public static void setWiresShapeHandler(final WiresShape shape, final HandlerRegistrationManager registrationManager, final WiresShapeHandler handler)
{
  final Group group = shape.getGroup();
  registrationManager.register(group.addNodeMouseClickHandler(handler));
  registrationManager.register(group.addNodeMouseDownHandler(handler));
  registrationManager.register(group.addNodeMouseUpHandler(handler));
  registrationManager.register(group.addNodeDragEndHandler(handler));
  group.setDragConstraints(handler);
  shape.setWiresShapeControl(handler.getControl());
}

代码示例来源:origin: com.ahome-it/lienzo-core

public void remove(final WiresShape shape)
{
  if (m_childShapes != null)
  {
    m_childShapes.remove(shape);
    m_container.remove(shape.getGroup());
    shape.setParent(null);
  }
  getLayoutHandler().requestLayout(this);
}

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

@Before
public void init() {
  layer = new Layer();
  wiresLayer = new WiresLayer(layer);
  shape1 = new WiresShape(new MultiPath().circle(50))
      .setLocation(new Point2D(100, 33));
  shape2 = new WiresShape(new MultiPath().circle(230))
      .setLocation(new Point2D(15, 120));
  wiresLayer.add(shape1);
  wiresLayer.add(shape2);
}

代码示例来源:origin: ahome-it/lienzo-core

m_registrationManager.register(m_wires_shape.addWiresDragStartHandler(new WiresDragStartHandler()
m_registrationManager.register(m_wires_shape.addWiresDragMoveHandler(new WiresDragMoveHandler()
m_registrationManager.register(m_wires_shape.addWiresDragEndHandler(new WiresDragEndHandler()
m_registrationManager.register(m_wires_shape.addWiresMoveHandler(new WiresMoveHandler()

代码示例来源:origin: ahome-it/lienzo-core

@Override
  public void onShapeResizeStep(final WiresResizeStepEvent event)
  {
    final WiresMagnet currentMagnet = parentWireShape.getMagnets().getMagnet(magnet.getIndex());
    shape.setLocation(calculateAbsCandidateLocation(shape, currentMagnet));
    shape.shapeMoved();
  }
}));

代码示例来源:origin: ahome-it/lienzo-core

private WiresManager getWiresManager()
{
  return getShape().getWiresManager();
}

代码示例来源:origin: ahome-it/lienzo-core

shapes.iterator().next().getWiresManager();
  if (!shape.getControl().onMoveComplete())

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