本文整理了Java中com.ait.lienzo.client.core.shape.Group.setLocation()
方法的一些代码示例,展示了Group.setLocation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Group.setLocation()
方法的具体详情如下:
包路径:com.ait.lienzo.client.core.shape.Group
类名称:Group
方法名:setLocation
暂无
代码示例来源:origin: com.ahome-it/lienzo-core
public WiresContainer setLocation(final Point2D p)
{
getGroup().setLocation(p);
return this;
}
代码示例来源:origin: ahome-it/lienzo-core
public WiresContainer setLocation(final Point2D p)
{
getGroup().setLocation(p);
return this;
}
代码示例来源:origin: ahome-it/lienzo-core
public WiresContainer setLocation(final Point2D p)
{
getGroup().setLocation(p);
return this;
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo-extensions
public Tooltip setLocation(final Point2D location) {
this.group.setLocation(location);
return checkRefresh();
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-api
private void updateControlLocations() {
if (controls == null) {
return;
}
if (!isControlsVisible) {
return;
}
for (Group ctrl : controls) {
final Point2D target = getControlTarget(ctrl).add(WiresBaseShape.this.getLocation());
ctrl.setLocation(target);
}
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo-extensions
private void reposition() {
// Obtain the toolbox's location relative to the cardinal direction.
final Point2D location = Positions.anchorFor(shapeBoundingBoxSupplier.get(),
this.at);
// Set the toolbox primitive's location.
asPrimitive().setLocation(location
.offset(this.offset));
fireRefresh();
}
代码示例来源:origin: kiegroup/appformer
private void updateControlLocations(final double dx,
final double dy) {
if (controls == null) {
return;
}
if (!isControlsVisible) {
return;
}
for (Group ctrl : controls) {
ctrl.setLocation(ctrl.getLocation().add(new Point2D(dx,
dy)));
}
}
代码示例来源:origin: kiegroup/appformer
private void updateControlLocations() {
if (controls == null) {
return;
}
if (!isControlsVisible) {
return;
}
for (Group ctrl : controls) {
final Point2D target = getControlTarget(ctrl).add(WiresBaseShape.this.getLocation());
ctrl.setLocation(target);
}
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-api
@Override
public void onStart(final IAnimation iAnimation,
final IAnimationHandle iAnimationHandle) {
//Store required transformations: Control, Current location, Target location
transformations.clear();
for (int index = 0; index < controls.size(); index++) {
final Group ctrl = controls.get(index);
final Point2D origin = new Point2D(0,
0);
final Point2D target = getControlTarget(ctrl);
transformations.put(ctrl,
new Pair<Point2D, Point2D>(origin,
target));
WiresBaseShape.this.getLayer().add(ctrl);
ctrl.setLocation(origin);
ctrl.setAlpha(0.0);
}
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-api
private void updateControlLocations(final double dx,
final double dy) {
if (controls == null) {
return;
}
if (!isControlsVisible) {
return;
}
for (Group ctrl : controls) {
ctrl.setLocation(ctrl.getLocation().add(new Point2D(dx,
dy)));
}
}
代码示例来源:origin: kiegroup/appformer
@Override
public void onStart(final IAnimation iAnimation,
final IAnimationHandle iAnimationHandle) {
//Store required transformations: Control, Current location, Target location
transformations.clear();
for (int index = 0; index < controls.size(); index++) {
final Group ctrl = controls.get(index);
final Point2D origin = new Point2D(0,
0);
final Point2D target = getControlTarget(ctrl);
transformations.put(ctrl,
new Pair<Point2D, Point2D>(origin,
target));
WiresBaseShape.this.getLayer().add(ctrl);
ctrl.setLocation(origin);
ctrl.setAlpha(0.0);
}
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo
@Override
public T setShapeLocation(final Point2D location) {
getGroup().setLocation(new com.ait.lienzo.client.core.types.Point2D(location.getX(),
location.getY()));
return cast();
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-api
controlsToAdd.removeAll(controls);
for (Group ctrl : controlsToAdd) {
ctrl.setLocation(new Point2D(0,
0));
ctrl.setAlpha(0.0);
代码示例来源:origin: kiegroup/appformer
controlsToAdd.removeAll(controls);
for (Group ctrl : controlsToAdd) {
ctrl.setLocation(new Point2D(0,
0));
ctrl.setAlpha(0.0);
代码示例来源:origin: kiegroup/appformer
@Override
public void onFrame(final IAnimation iAnimation,
final IAnimationHandle iAnimationHandle) {
final double pct = tweener.apply(iAnimation.getPercent() > 1.0 ? 1.0 : iAnimation.getPercent());
//Move each Control along the line between its origin and the target destination
for (Map.Entry<Group, Pair<Point2D, Point2D>> e : transformations.entrySet()) {
final Point2D origin = e.getValue().getK1();
final Point2D target = e.getValue().getK2();
final double dx = (target.getX() - origin.getX()) * pct;
final double dy = (target.getY() - origin.getY()) * pct;
e.getKey().setLocation(new Point2D(origin.getX() + dx,
origin.getY() + dy).add(WiresBaseShape.this.getLocation()));
}
for (Group ctrl : controls) {
ctrl.setAlpha(iAnimation.getPercent());
}
//Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode
WiresBaseShape.this.getLayer().batch();
}
代码示例来源:origin: kiegroup/appformer
@Override
public void onFrame(final IAnimation iAnimation,
final IAnimationHandle iAnimationHandle) {
final double pct = tweener.apply(iAnimation.getPercent() > 1.0 ? 1.0 : iAnimation.getPercent());
//Move each Control along the line between its origin and the target destination
for (Map.Entry<Group, Pair<Point2D, Point2D>> e : transformations.entrySet()) {
final Point2D origin = e.getValue().getK1();
final Point2D target = e.getValue().getK2();
final double dx = (target.getX() - origin.getX()) * pct;
final double dy = (target.getY() - origin.getY()) * pct;
e.getKey().setLocation(new Point2D(origin.getX() + dx,
origin.getY() + dy).add(WiresBaseShape.this.getLocation()));
}
for (Group ctrl : controls) {
ctrl.setAlpha(1.0 - iAnimation.getPercent());
}
//Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode
WiresBaseShape.this.getLayer().batch();
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-api
@Override
public void onFrame(final IAnimation iAnimation,
final IAnimationHandle iAnimationHandle) {
final double pct = tweener.apply(iAnimation.getPercent() > 1.0 ? 1.0 : iAnimation.getPercent());
//Move each Control along the line between its origin and the target destination
for (Map.Entry<Group, Pair<Point2D, Point2D>> e : transformations.entrySet()) {
final Point2D origin = e.getValue().getK1();
final Point2D target = e.getValue().getK2();
final double dx = (target.getX() - origin.getX()) * pct;
final double dy = (target.getY() - origin.getY()) * pct;
e.getKey().setLocation(new Point2D(origin.getX() + dx,
origin.getY() + dy).add(WiresBaseShape.this.getLocation()));
}
for (Group ctrl : controls) {
ctrl.setAlpha(1.0 - iAnimation.getPercent());
}
//Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode
WiresBaseShape.this.getLayer().batch();
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-api
@Override
public void onFrame(final IAnimation iAnimation,
final IAnimationHandle iAnimationHandle) {
final double pct = tweener.apply(iAnimation.getPercent() > 1.0 ? 1.0 : iAnimation.getPercent());
//Move each Control along the line between its origin and the target destination
for (Map.Entry<Group, Pair<Point2D, Point2D>> e : transformations.entrySet()) {
final Point2D origin = e.getValue().getK1();
final Point2D target = e.getValue().getK2();
final double dx = (target.getX() - origin.getX()) * pct;
final double dy = (target.getY() - origin.getY()) * pct;
e.getKey().setLocation(new Point2D(origin.getX() + dx,
origin.getY() + dy).add(WiresBaseShape.this.getLocation()));
}
for (Group ctrl : controls) {
ctrl.setAlpha(iAnimation.getPercent());
}
//Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode
WiresBaseShape.this.getLayer().batch();
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-api
@Override
public void onFrame(final IAnimation iAnimation,
final IAnimationHandle iAnimationHandle) {
final double pct = tweener.apply(iAnimation.getPercent() > 1.0 ? 1.0 : iAnimation.getPercent());
//Move each Control along the line between its origin and the target destination
for (Map.Entry<Group, Pair<Point2D, Point2D>> e : transformations.entrySet()) {
final Point2D origin = e.getValue().getK1();
final Point2D target = e.getValue().getK2();
final double dx = (target.getX() - origin.getX()) * pct;
final double dy = (target.getY() - origin.getY()) * pct;
e.getKey().setLocation(new Point2D(origin.getX() + dx,
origin.getY() + dy).add(WiresBaseShape.this.getLocation()));
}
for (Group ctrl : controlsToAdd) {
ctrl.setAlpha(pct);
}
for (Group ctrl : controlsToRemove) {
ctrl.setAlpha(1.0 - pct);
}
//Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode
WiresBaseShape.this.getLayer().batch();
}
代码示例来源:origin: kiegroup/appformer
@Override
public void onFrame(final IAnimation iAnimation,
final IAnimationHandle iAnimationHandle) {
final double pct = tweener.apply(iAnimation.getPercent() > 1.0 ? 1.0 : iAnimation.getPercent());
//Move each Control along the line between its origin and the target destination
for (Map.Entry<Group, Pair<Point2D, Point2D>> e : transformations.entrySet()) {
final Point2D origin = e.getValue().getK1();
final Point2D target = e.getValue().getK2();
final double dx = (target.getX() - origin.getX()) * pct;
final double dy = (target.getY() - origin.getY()) * pct;
e.getKey().setLocation(new Point2D(origin.getX() + dx,
origin.getY() + dy).add(WiresBaseShape.this.getLocation()));
}
for (Group ctrl : controlsToAdd) {
ctrl.setAlpha(pct);
}
for (Group ctrl : controlsToRemove) {
ctrl.setAlpha(1.0 - pct);
}
//Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode
WiresBaseShape.this.getLayer().batch();
}
内容来源于网络,如有侵权,请联系作者删除!