gpt4 book ai didi

org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.Width.getValue()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 08:27:05 31 4
gpt4 key购买 nike

本文整理了Java中org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.Width.getValue()方法的一些代码示例,展示了Width.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Width.getValue()方法的具体详情如下:
包路径:org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.Width
类名称:Width
方法名:getValue

Width.getValue介绍

暂无

代码示例

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

public SVGShapeView<?> newViewInstance(final Optional<Width> width,
                      final Optional<Height> height,
                      final SVGShapeViewResource viewResource
  ) {
    Optional<Double> widthValue = Optional.ofNullable(width.isPresent() ? width.get().getValue() : null);
    Optional<Double> heightValue = Optional.ofNullable(height.isPresent() ? height.get().getValue() : null);
    return viewResource.build(widthValue.orElse(null), heightValue.orElse(null), true);
  }
}

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

@Override
public SizeHandler<BPMNDiagramImpl, SVGShapeView> newSizeHandler() {
  return newSizeHandlerBuilder()
      .width(e -> e.getDimensionsSet().getWidth().getValue())
      .height(e -> e.getDimensionsSet().getHeight().getValue())
      .build();
}

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

@Override
public SizeHandler<CaseManagementDiagram, SVGShapeView> newSizeHandler() {
  return newSizeHandlerBuilder()
      .width(e -> e.getDimensionsSet().getWidth().getValue())
      .height(e -> e.getDimensionsSet().getHeight().getValue())
      .build();
}

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

@Override
public SizeHandler<BaseSubprocess, SVGShapeView> newSizeHandler() {
  return newSizeHandlerBuilder()
      .width(task -> task.getDimensionsSet().getWidth().getValue())
      .height(task -> task.getDimensionsSet().getHeight().getValue())
      .minWidth(task -> 50d)
      .minHeight(task -> 50d)
      .build();
}

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

@Override
public SizeHandler<UserTask, SVGShapeView> newSizeHandler() {
  return newSizeHandlerBuilder()
      .width(e -> e.getDimensionsSet().getWidth().getValue())
      .height(e -> e.getDimensionsSet().getHeight().getValue())
      .minWidth(e -> 50d)
      .minHeight(e -> 50d)
      .build();
}

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

@Override
public SizeHandler<Lane, SVGShapeView> newSizeHandler() {
  return newSizeHandlerBuilder()
      .width(e -> e.getDimensionsSet().getWidth().getValue())
      .height(e -> e.getDimensionsSet().getHeight().getValue())
      .minWidth(task -> 200d)
      .minHeight(task -> 200d)
      .build();
}

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

@Override
public SizeHandler<BaseCaseManagementReusableSubprocess, SVGShapeView> newSizeHandler() {
  return newSizeHandlerBuilder()
      .width(e -> e.getDimensionsSet().getWidth().getValue())
      .height(e -> e.getDimensionsSet().getHeight().getValue())
      .minWidth(e -> 50d)
      .minHeight(e -> 50d)
      .build();
}

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

@Override
public SizeHandler<AdHocSubprocess, SVGShapeView> newSizeHandler() {
  return newSizeHandlerBuilder()
      .width(e -> e.getDimensionsSet().getWidth().getValue())
      .height(e -> e.getDimensionsSet().getHeight().getValue())
      .minWidth(e -> 50d)
      .minHeight(e -> 50d)
      .build();
}

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

@Override
public SizeHandler<ServiceTask, SVGShapeView> newSizeHandler() {
  return newSizeHandlerBuilder()
      .width(task -> task.getDimensionsSet().getWidth().getValue())
      .height(task -> task.getDimensionsSet().getHeight().getValue())
      .minWidth(task -> 25d)
      .maxWidth(task -> 400d)
      .minHeight(task -> 25d)
      .maxHeight(task -> 400d)
      .build();
}

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

@Override
public SizeHandler<BaseTask, SVGShapeView> newSizeHandler() {
  return newSizeHandlerBuilder()
      .width(task -> task.getDimensionsSet().getWidth().getValue())
      .height(task -> task.getDimensionsSet().getHeight().getValue())
      .minWidth(task -> 50d)
      .maxWidth(task -> 400d)
      .minHeight(task -> 50d)
      .maxHeight(task -> 400d)
      .build();
}

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

@Test
  public void testGetRectangleDimensionsSet() {
    RectangleDimensionsSet rectangleDimensionsSet = tested.getRectangleDimensionsSet();
    assertEquals(65.0d, rectangleDimensionsSet.getWidth().getValue(), 0d);
    assertEquals(354.4710174560547d, rectangleDimensionsSet.getHeight().getValue(), 0d);
  }
}

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

@Override
public void handle(final ServiceTask bean,
          final SVGShapeView<?> view) {
  // Obtain the work item's icon data url.
  final String itemIconData = workItemDefinitionRegistry
      .get()
      .get(bean.getName())
      .getIconDefinition()
      .getIconData();
  final String iconData = null != itemIconData ? itemIconData : WorkItemDefinitionClientUtils.getDefaultIconData();
  // Obtain the image element from the svg shape view.
  final SVGPrimitive svgPrimitive = SVGViewUtils.getPrimitive(view, WID_ICON_ID).get();
  // Load the icon data.
  final Picture icon = (Picture) svgPrimitive.get();
  if (hasDataChanged(iconData,
            icon.getURL())) {
    forceLoad(icon,
         iconData,
         () -> scaleViewIcon(view, icon));
  }
  if (Objects.equals(bean.getDimensionsSet().getHeight().getValue(), 0d)
      && Objects.equals(bean.getDimensionsSet().getWidth().getValue(), 0d)) {
    bean.getDimensionsSet().getHeight().setValue(view.getPrimitive().get().getAttributes().getHeight());
    bean.getDimensionsSet().getWidth().setValue(view.getPrimitive().get().getAttributes().getWidth());
  }
}

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