@Override public void onClose(final IAnimation iAnimation, final IAnimationHandle iAnimationHandle) { for (Group ctrl : controls) { WiresBaseShape.this.getLayer().remove(ctrl); } } });
@Override public void onClose(final IAnimation iAnimation, final IAnimationHandle iAnimationHandle) { isControlsVisible = !controls.isEmpty(); for (Group ctrl : controlsToRemove) { WiresBaseShape.this.getLayer().remove(ctrl); } } });
@Override public void onClose(final IAnimation iAnimation, final IAnimationHandle iAnimationHandle) { for (Group ctrl : controls) { WiresBaseShape.this.getLayer().remove(ctrl); } } });
@Override public void onClose(final IAnimation iAnimation, final IAnimationHandle iAnimationHandle) { isControlsVisible = !controls.isEmpty(); for (Group ctrl : controlsToRemove) { WiresBaseShape.this.getLayer().remove(ctrl); } } });
@Override public void setCurrentStringValue(final String currentStringValue) { super.setCurrentStringValue(currentStringValue); try { final double y = Double.parseDouble(currentStringValue); shape.setY(y); 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 void setCurrentStringValue(final String currentStringValue) { super.setCurrentStringValue(currentStringValue); try { final double y = Double.parseDouble(currentStringValue); shape.setY(y); 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 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); } }
@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); } }
0)); ctrl.setAlpha(0.0); WiresBaseShape.this.getLayer().add(ctrl);
0)); ctrl.setAlpha(0.0); WiresBaseShape.this.getLayer().add(ctrl);
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }