com.ait.lienzo.client.core.shape.Group.setY()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(24.9k)|赞(0)|评价(0)|浏览(124)

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

Group.setY介绍

暂无

代码示例

代码示例来源:origin: org.uberfire/uberfire-wires-core-api

@Override
  public Group setY(final double y) {
    final double dy = y - super.getY();
    final Group g = super.setY(y);
    updateControlLocations(0,
                dy);
    return g;
  }
}

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

@Override
protected void doAnimateValuesAxisIntervals(final XYChartLabel chartLabel, final AxisLabel axisLabel, final Double x, final Double y)
{
  chartLabel.set(axisLabel);
  chartLabel.setX(x).setY(y);
}

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

@Override
protected void setLocation(WiresConnector shape,
              int x,
              int y) {
  shape.getGroup().setX(x).setY(y);
}

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

@Override
protected void doAnimateCategoriesAxisIntervals(final XYChartLabel chartLabel, final AxisLabel axisLabel, final Double x, final Double y)
{
  chartLabel.set(axisLabel);
  chartLabel.setX(x).setY(y);
}

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

@Override
protected void doAnimateCategoriesAxisIntervals(final XYChartLabel chartLabel, final AxisLabel axisLabel, final Double x, final Double y)
{
  chartLabel.set(axisLabel);
  chartLabel.setX(x).setY(y);
}

代码示例来源:origin: kiegroup/appformer

@Override
  public Group setY(final double y) {
    final double dy = y - super.getY();
    final Group g = super.setY(y);
    updateControlLocations(0,
                dy);
    return g;
  }
}

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

private void moveGroups(double w, double h)
{
  final Group labels = getPieChart().getLabels();
  final Group slices = getPieChart().getSlices();
  final double x = w / 2;
  final double y = h / 2;
  labels.setX(x).setY(y);
  slices.setX(x).setY(y);
}

代码示例来源:origin: org.drools/drools-wb-guided-dtree-editor-client

@Override
protected Group scaleGlyph( final ShapeGlyph glyph ) {
  final double sx = GLYPH_WIDTH / glyph.getWidth();
  final double sy = GLYPH_HEIGHT / glyph.getHeight();
  final Group group = glyph.getGroup();
  return group.setX( STENCIL_HEIGHT / 2 ).setY( STENCIL_HEIGHT / 2 ).setScale( sx,
                                         sy );
}

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

@Override
  public void onNodeMouseEnter(NodeMouseEnterEvent event)
  {
    double x = circle.getX();
    double y = circle.getY();
    seriesValuesAlpha(numSeries, numValue, 0.5d);
    tooltip.setX(x).setY(y);
    tooltip.show(xValueFormatted, yValueFormatted);
  }
});

代码示例来源:origin: kiegroup/appformer

/**
 * Scale the Shape provided by the ShapeFactory as the glyph to fit the PaletteShape.
 * @param glyph
 * @return
 */
protected Group scaleGlyph(final ShapeGlyph glyph) {
  final double sx = GLYPH_WIDTH / glyph.getWidth();
  final double sy = GLYPH_HEIGHT / glyph.getHeight();
  final Group group = glyph.getGroup();
  return group.setX(ShapeFactoryUtil.WIDTH_BOUNDING / 2).setY(ShapeFactoryUtil.WIDTH_BOUNDING / 2).setScale(sx,
                                                       sy);
}

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

private SVGBasicShapeView endEscalationEventBasicView(final double width, final double height) {

  SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_EVENT_BACKGROUND).setDraggable(false).setID("event-background").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#fce7e7"), false, null);

  final SVGBasicShapeViewImpl view = new SVGBasicShapeViewImpl("endEscalationEvent", mainShape, width, height);

    SVGContainer event_type = SVGPrimitiveFactory.newSVGContainer("event-type",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("event-type").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape end = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_END).setDraggable(false).setID("end").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#a30000"), true, null);event_type.add(end);
    view.addChild(event_type);
    SVGContainer event_subtypes = SVGPrimitiveFactory.newSVGContainer("event-subtypes",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("event-subtypes").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape escalation_catching = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_ESCALATION_CATCHING).setDraggable(false).setID("escalation-catching").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#a30000"), true, null);event_subtypes.add(escalation_catching);
    view.addChild(event_subtypes);

  return view;
}

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

private SVGBasicShapeView intermediateSignalThrowingEventBasicView(final double width, final double height) {

  SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_EVENT_BACKGROUND).setDraggable(false).setID("event-background").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#bedee1"), false, null);

  final SVGBasicShapeViewImpl view = new SVGBasicShapeViewImpl("intermediateSignalThrowingEvent", mainShape, width, height);

    SVGContainer event_type = SVGPrimitiveFactory.newSVGContainer("event-type",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("event-type").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape intermediate = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_INTERMEDIATE).setDraggable(false).setID("intermediate").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#007a87"), true, null);event_type.add(intermediate);
    view.addChild(event_type);
    SVGContainer event_subtypes = SVGPrimitiveFactory.newSVGContainer("event-subtypes",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("event-subtypes").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape signal_throwing = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_SIGNAL_THROWING).setDraggable(false).setID("signal-throwing").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#007a87"), true, null);event_subtypes.add(signal_throwing);
    view.addChild(event_subtypes);

  return view;
}

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

private SVGBasicShapeView inclusiveGatewayBasicView(final double width, final double height) {

  SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_GATEWAY_BACKGROUND).setDraggable(false).setID("gateway-background").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#fef4ea"), false, null);

  final SVGBasicShapeViewImpl view = new SVGBasicShapeViewImpl("inclusiveGateway", mainShape, width, height);

    SVGContainer gateway_type = SVGPrimitiveFactory.newSVGContainer("gateway-type",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("gateway-type").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape gateway = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_GATEWAY).setDraggable(false).setID("gateway").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#ec7a08"), true, null);gateway_type.add(gateway);
    view.addChild(gateway_type);
    SVGContainer gateway_subtypes = SVGPrimitiveFactory.newSVGContainer("gateway-subtypes",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("gateway-subtypes").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape inclusive = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_INCLUSIVE).setDraggable(false).setID("inclusive").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#ec7a08"), true, null);gateway_subtypes.add(inclusive);
    view.addChild(gateway_subtypes);

  return view;
}

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

private SVGBasicShapeView intermediateMessageThrowingEventBasicView(final double width, final double height) {

  SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_EVENT_BACKGROUND).setDraggable(false).setID("event-background").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#bedee1"), false, null);

  final SVGBasicShapeViewImpl view = new SVGBasicShapeViewImpl("intermediateMessageThrowingEvent", mainShape, width, height);

    SVGContainer event_type = SVGPrimitiveFactory.newSVGContainer("event-type",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("event-type").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape intermediate = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_INTERMEDIATE).setDraggable(false).setID("intermediate").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#007a87"), true, null);event_type.add(intermediate);
    view.addChild(event_type);
    SVGContainer event_subtypes = SVGPrimitiveFactory.newSVGContainer("event-subtypes",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("event-subtypes").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape message_throwing = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_MESSAGE_THROWING).setDraggable(false).setID("message-throwing").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#007a87"), true, null);event_subtypes.add(message_throwing);
    view.addChild(event_subtypes);

  return view;
}

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

private SVGBasicShapeView startEscalationEventBasicView(final double width, final double height) {

  SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_EVENT_BACKGROUND).setDraggable(false).setID("event-background").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#e8fae6"), false, null);

  final SVGBasicShapeViewImpl view = new SVGBasicShapeViewImpl("startEscalationEvent", mainShape, width, height);

    SVGContainer event_type = SVGPrimitiveFactory.newSVGContainer("event-type",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("event-type").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape start = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_START).setDraggable(false).setID("start").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#4aa241").setFillAlpha(1.00).setStrokeColor("#4aa241").setStrokeAlpha(0.00).setStrokeWidth(5.00).setDashArray(15.00,15.00), true, null);event_type.add(start);
    view.addChild(event_type);
    SVGContainer event_subtypes = SVGPrimitiveFactory.newSVGContainer("event-subtypes",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("event-subtypes").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape escalation_catching = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_ESCALATION_CATCHING).setDraggable(false).setID("escalation-catching").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#4aa241"), true, null);event_subtypes.add(escalation_catching);
    view.addChild(event_subtypes);

  return view;
}

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

private SVGBasicShapeView intermediateCompensationCatchingEventBasicView(final double width, final double height) {

  SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_EVENT_BACKGROUND).setDraggable(false).setID("event-background").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#fbefcf"), false, null);

  final SVGBasicShapeViewImpl view = new SVGBasicShapeViewImpl("intermediateCompensationCatchingEvent", mainShape, width, height);

    SVGContainer event_type = SVGPrimitiveFactory.newSVGContainer("event-type",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("event-type").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape intermediate = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_INTERMEDIATE).setDraggable(false).setID("intermediate").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#e5a000").setFillAlpha(1.00).setStrokeColor("#e5a000").setStrokeAlpha(0.00).setStrokeWidth(5.00).setDashArray(15.00,15.00), true, null);event_type.add(intermediate);
    view.addChild(event_type);
    SVGContainer event_subtypes = SVGPrimitiveFactory.newSVGContainer("event-subtypes",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("event-subtypes").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape compensation_catching = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_COMPENSATION_CATCHING).setDraggable(false).setID("compensation-catching").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#e5a000"), true, null);event_subtypes.add(compensation_catching);
    view.addChild(event_subtypes);

  return view;
}

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

private SVGShapeView startNoneEventView(final double width, final double height, final boolean resizable) {

  SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_EVENT_BACKGROUND).setDraggable(false).setID("event-background").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#e8fae6"), true, null);

  final SVGShapeView view = getViewBuilder().build("startNoneEvent", mainShape, width, height, resizable);

    SVGContainer event_type = SVGPrimitiveFactory.newSVGContainer("event-type",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("event-type").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), true, null);SVGPrimitiveShape start = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_START).setDraggable(false).setID("start").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#4aa241"), true, null);event_type.add(start);
    view.addChild(event_type);

  view.setTitleAlpha(1.00d);view.setTitleFontFamily("Open Sans");view.setTitleFontSize(12.00d);view.setTitleFontColor("#000000");view.setTitleStrokeWidth(1.00d);view.setTitleStrokeColor("#393f44");

  if (view instanceof SVGShapeViewImpl) {
    ((SVGShapeViewImpl) view).getShapeStateHandler().setBorderShape(() -> SVGViewUtils.getVisibleShape(start));
    ((SVGShapeViewImpl) view).getShapeStateHandler().setRenderType(org.kie.workbench.common.stunner.client.lienzo.shape.impl.ShapeStateDefaultHandler.RenderType.FILL);
  }

  return view;
}

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

private SVGBasicShapeView eventSubProcessBasicView(final double width, final double height) {

  SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(650.00, 250.00).setCornerRadius(2.00).setDraggable(false).setID("subProcess__ZJ6G").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#fafafa"), false, null);

  final SVGBasicShapeViewImpl view = new SVGBasicShapeViewImpl("eventSubProcess", mainShape, width, height);

    SVGPrimitiveShape subProcess_border = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(650.00, 250.00).setCornerRadius(2.00).setDraggable(false).setID("subProcess-border").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setStrokeColor("#393f44").setStrokeWidth(2.00).setDashArray(2.00,2.00), true, null);
    view.addChild(subProcess_border);
    SVGContainer subProcess__CyZF = SVGPrimitiveFactory.newSVGContainer("subProcess__CyZF",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("subProcess__CyZF").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(0.05,0.05).setOffset(300.00,220.00).setListening(false) ), false, com.ait.lienzo.client.core.shape.wires.LayoutContainer.Layout.BOTTOM);SVGPrimitiveShape subProcess__CyZF__Kxy0 = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_SUBPROCESS__CYZF__KXY0).setDraggable(false).setID("subProcess__CyZF__Kxy0").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00), false, null);subProcess__CyZF.add(subProcess__CyZF__Kxy0);
    view.addChild(subProcess__CyZF);

  return view;
}

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

private SVGBasicShapeView reusableSubProcessBasicView(final double width, final double height) {

  SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(150.00, 98.00).setCornerRadius(2.00).setDraggable(false).setID("subProcess-background").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#ffffff"), false, null);

  final SVGBasicShapeViewImpl view = new SVGBasicShapeViewImpl("reusableSubProcess", mainShape, width, height);

    SVGPrimitiveShape subProcess_border = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(150.00, 98.00).setCornerRadius(2.00).setDraggable(false).setID("subProcess-border").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setStrokeColor("#393f44").setStrokeWidth(1.50), true, null);
    view.addChild(subProcess_border);
    SVGContainer subProcess__D5TA = SVGPrimitiveFactory.newSVGContainer("subProcess__D5TA",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("subProcess__D5TA").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), false, com.ait.lienzo.client.core.shape.wires.LayoutContainer.Layout.BOTTOM);SVGPrimitiveShape subProcess__D5TA__5wNY = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(25.00, 25.00).setCornerRadius(0.00).setDraggable(false).setID("subProcess__D5TA__5wNY").setX(63.00).setY(66.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillAlpha(0.00).setStrokeColor("#393f44").setStrokeWidth(1.50), false, null);subProcess__D5TA.add(subProcess__D5TA__5wNY);SVGPrimitiveShape subProcess__D5TA__X9Hg = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_SUBPROCESS__D5TA__X9HG).setDraggable(false).setID("subProcess__D5TA__X9Hg").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(0.04,0.04).setOffset(71.50,72.50).setFillColor("#000000").setStrokeColor("#000000"), false, null);subProcess__D5TA.add(subProcess__D5TA__X9Hg);
    view.addChild(subProcess__D5TA);

  return view;
}

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

private SVGBasicShapeView scriptTaskBasicView(final double width, final double height) {

  SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(150.00, 98.00).setCornerRadius(2.00).setDraggable(false).setID("task").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#ffffff").setStrokeAlpha(0.00), false, null);

  final SVGBasicShapeViewImpl view = new SVGBasicShapeViewImpl("scriptTask", mainShape, width, height);

    SVGPrimitiveShape task_border = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(150.00, 98.00).setCornerRadius(2.00).setDraggable(false).setID("task-border").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setStrokeColor("#000000").setStrokeWidth(1.50), true, null);
    view.addChild(task_border);
    SVGContainer task__Utec = SVGPrimitiveFactory.newSVGContainer("task__Utec",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("task__Utec").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(0.06,0.06).setOffset(10.00,10.00).setListening(false) ), false, null);SVGPrimitiveShape task__Utec__ts1K = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_TASK__UTEC__TS1K).setDraggable(false).setID("task__Utec__ts1K").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#393f44"), false, null);task__Utec.add(task__Utec__ts1K);SVGPrimitiveShape task__Utec__U6ex = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_TASK__UTEC__U6EX).setDraggable(false).setID("task__Utec__U6ex").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#393f44"), false, null);task__Utec.add(task__Utec__U6ex);SVGPrimitiveShape task__Utec__NWQr = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_TASK__UTEC__NWQR).setDraggable(false).setID("task__Utec__NWQr").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#393f44"), false, null);task__Utec.add(task__Utec__NWQr);
    view.addChild(task__Utec);

  return view;
}

相关文章