本文整理了Java中com.ait.lienzo.client.core.shape.Group
类的一些代码示例,展示了Group
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Group
类的具体详情如下:
包路径:com.ait.lienzo.client.core.shape.Group
类名称:Group
暂无
代码示例来源: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: com.ahome-it/lienzo-core
protected void updateParentLocation()
{
if ((null == m_parent) && (null != getGroup().getLayer()))
{
m_parent = new Group();
getGroup().getLayer().add(m_parent);
}
if (null == m_parent)
{
return;
}
final Point2D p = getGroup().getComputedLocation();
m_parent.setX(p.getX());
m_parent.setY(p.getY());
m_parent.moveToTop();
for (final WiresShape child : m_wires_shape.getChildShapes())
{
final WiresShapeControlHandleList list = child.getControls();
if (null != list)
{
list.updateParentLocation();
}
}
}
代码示例来源: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-core
@Override
public LayoutContainer execute()
{
for (final IPrimitive<?> child : group.getChildNodes())
{
doPositionChild(child, false);
}
if (null != getGroup().getLayer())
{
getGroup().getLayer().batch();
}
return this;
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client
@Before
public void setup() {
layer = spy(new Layer());
final Group shapeGroup = mock(Group.class);
when(shapeGroup.getLayer()).thenReturn(layer);
when(shape.getGroup()).thenReturn(shapeGroup);
when(shape.getWiresManager()).thenReturn(wiresManager);
doReturn(ghost).when(shape).getGhost();
when(wiresManager.getContainmentAcceptor()).thenReturn(containmentAcceptor);
when(parentPickerControl.getPickerOptions()).thenReturn(PICKER_OPTIONS);
when(parentPickerControl.getShapeLocationControl()).thenReturn(shapeLocationControl);
when(parentPickerControl.getIndex()).thenReturn(index);
when(containmentControl.getParentPickerControl()).thenReturn(parentPickerControl);
when(containmentControl.getShape()).thenReturn(shape);
when(containmentControl.getParent()).thenReturn(parent);
final NFastArrayList<WiresShape> children = new NFastArrayList<>();
children.add(shape);
children.add(ghost);
when(parent.getChildShapes()).thenReturn(children);
when(parent.getLayoutHandler()).thenReturn(parentLayoutHandler);
when(parent.getIndex(eq(shape))).thenReturn(0);
when(parent.getGroup()).thenReturn(new Group());
when(state.getGhost()).thenReturn(Optional.of(ghost));
when(state.getOriginalParent()).thenReturn(Optional.of(parent));
when(state.getOriginalIndex()).thenReturn(OptionalInt.of(0));
control = new CaseManagementContainmentControl(containmentControl,
state);
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo-extensions
@Override
public Layer getLayer() {
return toolbox.asPrimitive().getLayer();
}
代码示例来源:origin: com.ahome-it/lienzo-core
public double getY()
{
return getGroup().getY();
}
代码示例来源:origin: org.drools/drools-wb-guided-dtree-editor-client
@Override
public void onFrame(final IAnimation iAnimation,
final IAnimationHandle iAnimationHandle) {
//Lienzo's IAnimation.getPercent() passes values > 1.0
final double pct = iAnimation.getPercent() > 1.0 ? 1.0 : iAnimation.getPercent();
hint.setAlpha(1 - pct);
hint.getLayer().batch();
}
代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-charts
@Override
public void onNodeDragEnd(NodeDragEndEvent nodeDragEndEvent) {
double x = nodeDragEndEvent.getX();
double y = nodeDragEndEvent.getY();
if (x < chartArea.getX() || x > (chartArea.getX() + getChartWidth()) ||
y < chartArea.getY() || y > (chartArea.getY() + getChartHeight())) {
// Remove the series from data.
XYChartData data = getData();
data.removeSerie(serie);
// Force firing attributes changed event in order to capture it and redraw the chart.
setData(data);
}
}
});
代码示例来源:origin: com.ahome-it/lienzo-core
private void drawLayer()
{
if (null != m_parent)
{
m_parent.getGroup().getLayer().batch();
}
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo
@Override
public double getShapeY() {
return getGroup().getY();
}
代码示例来源:origin: org.drools/drools-wb-guided-dtree-editor-client
@Override
public void onFrame(final IAnimation iAnimation,
final IAnimationHandle iAnimationHandle) {
//Lienzo's IAnimation.getPercent() passes values > 1.0
final double pct = iAnimation.getPercent() > 1.0 ? 1.0 : iAnimation.getPercent();
hint.setAlpha(pct);
hint.getLayer().batch();
}
代码示例来源:origin: org.drools/drools-wb-guided-dtable-editor-client
@Override
public boolean isNodeMouseEventOverCaption(final INodeXYEvent event) {
final Point2D ap = CoordinateUtilities.convertDOMToGridCoordinate(this,
new Point2D(event.getX(),
event.getY()));
final double cx = ap.getX();
final double cy = ap.getY();
if (cx > headerCaption.getX() && cx < headerCaption.getX() + getHeaderCaptionWidth()) {
if (cy > headerCaption.getY() && cy < headerCaption.getY() + HEADER_CAPTION_HEIGHT) {
return true;
}
}
return false;
}
代码示例来源:origin: ahome-it/lienzo-core
@Override
public LayoutContainer execute()
{
for (final IPrimitive<?> child : group.getChildNodes())
{
doPositionChild(child, false);
}
if (null != getGroup().getLayer())
{
getGroup().getLayer().batch();
}
return this;
}
代码示例来源: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: ahome-it/lienzo-core
protected void updateParentLocation()
{
if ((null == m_parent) && (null != getGroup().getLayer()))
{
m_parent = new Group();
getGroup().getLayer().add(m_parent);
}
if (null == m_parent)
{
return;
}
final Point2D p = getGroup().getComputedLocation();
m_parent.setX(p.getX());
m_parent.setY(p.getY());
m_parent.moveToTop();
for (final WiresShape child : m_wires_shape.getChildShapes())
{
final WiresShapeControlHandleList list = child.getControls();
if (null != list)
{
list.updateParentLocation();
}
}
}
代码示例来源: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: ahome-it/lienzo-core
private void drawLayer()
{
if (null != m_parent)
{
m_parent.getGroup().getLayer().batch();
}
}
代码示例来源:origin: ahome-it/lienzo-core
public double getY()
{
return getGroup().getY();
}
代码示例来源:origin: kiegroup/drools-wb
@Override
public void onFrame(final IAnimation iAnimation,
final IAnimationHandle iAnimationHandle) {
//Lienzo's IAnimation.getPercent() passes values > 1.0
final double pct = iAnimation.getPercent() > 1.0 ? 1.0 : iAnimation.getPercent();
hint.setAlpha(1 - pct);
hint.getLayer().batch();
}
内容来源于网络,如有侵权,请联系作者删除!