@Override public Group setX(final double x) { final Group g = super.setX(x); updateConnectorsEndPoints(); return g; }
@Override public Group setX(final double x) { final Group g = super.setX(x); updateConnectorsEndPoints(); return g; }
@Override public void setCurrentStringValue(final String currentStringValue) { super.setCurrentStringValue(currentStringValue); try { final double x = Double.parseDouble(currentStringValue); shape.setX(x); shape.getLayer().batch(); } catch (NumberFormatException e) { //Swallow } } };
@Override public void setCurrentStringValue(final String currentStringValue) { super.setCurrentStringValue(currentStringValue); try { final double x = Double.parseDouble(currentStringValue); shape.setX(x); shape.getLayer().batch(); } catch (NumberFormatException e) { //Swallow } } };
@Override public Group setX(final double x) { final double dx = x - getX(); final double dy = 0; updateMagnetLocations(dx, dy); updateControlPointLocations(dx, dy); final Group g = super.setX(x); return g; }
@Override public Group setX(final double x) { final double dx = x - getX(); final double dy = 0; updateMagnetLocations(dx, dy); updateControlPointLocations(dx, dy); final Group g = super.setX(x); return g; }
@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(); //Move each descendant along the line between its origin and the target destination for (Map.Entry<WiresBaseShape, Pair<Point2D, Point2D>> e : transformations.entrySet()) { final Point2D descendantOrigin = e.getValue().getK1(); final Point2D descendantTarget = e.getValue().getK2(); final double dx = (descendantTarget.getX() - descendantOrigin.getX()) * pct; final double dy = (descendantTarget.getY() - descendantOrigin.getY()) * pct; e.getKey().setX(descendantOrigin.getX() + dx); e.getKey().setY(descendantOrigin.getY() + dy); } //Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode root.getLayer().batch(); }
@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(); //Move each descendant along the line between its origin and the target destination for (Map.Entry<WiresBaseShape, Pair<Point2D, Point2D>> e : transformations.entrySet()) { final Point2D descendantOrigin = e.getValue().getK1(); final Point2D descendantTarget = e.getValue().getK2(); final double dx = (descendantTarget.getX() - descendantOrigin.getX()) * pct; final double dy = (descendantTarget.getY() - descendantOrigin.getY()) * pct; e.getKey().setX(descendantOrigin.getX() + dx); e.getKey().setY(descendantOrigin.getY() + dy); } //Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode root.getLayer().batch(); }
@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(); //Move each descendant along the line between its origin and the target destination for (Map.Entry<WiresBaseShape, Pair<Point2D, Point2D>> e : transformations.entrySet()) { final Point2D descendantOrigin = e.getValue().getK1(); final Point2D descendantTarget = e.getValue().getK2(); final double dx = (descendantTarget.getX() - descendantOrigin.getX()) * pct; final double dy = (descendantTarget.getY() - descendantOrigin.getY()) * pct; e.getKey().setX(descendantOrigin.getX() + dx); e.getKey().setY(descendantOrigin.getY() + dy); } //Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode uiRoot.getLayer().batch(); }
@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(); //Move each descendant along the line between its origin and the target destination for (Map.Entry<WiresBaseShape, Pair<Point2D, Point2D>> e : transformations.entrySet()) { final Point2D descendantOrigin = e.getValue().getK1(); final Point2D descendantTarget = e.getValue().getK2(); final double dx = (descendantTarget.getX() - descendantOrigin.getX()) * pct; final double dy = (descendantTarget.getY() - descendantOrigin.getY()) * pct; e.getKey().setX(descendantOrigin.getX() + dx); e.getKey().setY(descendantOrigin.getY() + dy); } //Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode uiRoot.getLayer().batch(); }
@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(); //Move each descendant along the line between its origin and the target destination for (Map.Entry<WiresBaseShape, Pair<Point2D, Point2D>> e : transformations.entrySet()) { final Point2D descendantOrigin = e.getValue().getK1(); final Point2D descendantTarget = e.getValue().getK2(); final double dx = (descendantTarget.getX() - descendantOrigin.getX()) * pct; final double dy = (descendantTarget.getY() - descendantOrigin.getY()) * pct; e.getKey().setX(descendantOrigin.getX() + dx); e.getKey().setY(descendantOrigin.getY() + dy); } for (WiresBaseTreeNode descendant : descendants) { descendant.setAlpha(1.0 - pct); } //Allow subclasses to change their appearance onCollapseProgress(pct); //Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode WiresBaseTreeNode.this.getLayer().batch(); }
@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(); //Move each descendant along the line between its origin and the target destination for (Map.Entry<WiresBaseShape, Pair<Point2D, Point2D>> e : transformations.entrySet()) { final Point2D descendantOrigin = e.getValue().getK1(); final Point2D descendantTarget = e.getValue().getK2(); final double dx = (descendantTarget.getX() - descendantOrigin.getX()) * pct; final double dy = (descendantTarget.getY() - descendantOrigin.getY()) * pct; e.getKey().setX(descendantOrigin.getX() + dx); e.getKey().setY(descendantOrigin.getY() + dy); } for (WiresBaseTreeNode descendant : descendants) { descendant.setAlpha(pct); } //Allow subclasses to change their appearance onExpandProgress(pct); //Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode WiresBaseTreeNode.this.getLayer().batch(); }
@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(); //Move each descendant along the line between its origin and the target destination for (Map.Entry<WiresBaseShape, Pair<Point2D, Point2D>> e : transformations.entrySet()) { final Point2D descendantOrigin = e.getValue().getK1(); final Point2D descendantTarget = e.getValue().getK2(); final double dx = (descendantTarget.getX() - descendantOrigin.getX()) * pct; final double dy = (descendantTarget.getY() - descendantOrigin.getY()) * pct; e.getKey().setX(descendantOrigin.getX() + dx); e.getKey().setY(descendantOrigin.getY() + dy); } for (WiresBaseTreeNode descendant : descendants) { descendant.setAlpha(pct); } //Allow subclasses to change their appearance onExpandProgress(pct); //Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode WiresBaseTreeNode.this.getLayer().batch(); }
@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(); //Move each descendant along the line between its origin and the target destination for (Map.Entry<WiresBaseShape, Pair<Point2D, Point2D>> e : transformations.entrySet()) { final Point2D descendantOrigin = e.getValue().getK1(); final Point2D descendantTarget = e.getValue().getK2(); final double dx = (descendantTarget.getX() - descendantOrigin.getX()) * pct; final double dy = (descendantTarget.getY() - descendantOrigin.getY()) * pct; e.getKey().setX(descendantOrigin.getX() + dx); e.getKey().setY(descendantOrigin.getY() + dy); } for (WiresBaseTreeNode descendant : descendants) { descendant.setAlpha(1.0 - pct); } //Allow subclasses to change their appearance onCollapseProgress(pct); //Without this call Lienzo doesn't update the Canvas for sub-classes of WiresBaseTreeNode WiresBaseTreeNode.this.getLayer().batch(); }
wiresShape.setX(cx); wiresShape.setY(cy);
wiresShape.setX(cx); wiresShape.setY(cy);
wiresShape.setX(cx); wiresShape.setY(cy);
wiresShape.setX(cx); wiresShape.setY(cy);