--- old/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java 2016-04-29 10:53:57.438974700 -0700 +++ new/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java 2016-04-29 10:53:57.069256400 -0700 @@ -136,14 +136,6 @@ // Deprecated stuff in Parent -// // RT-21217 : Promote impl_fromPlatformImage to public API -// public static Image fromPlatformImage(Object platformImage) { -// return Image.impl_fromPlatformImage(platformImage); -// } -// // RT-21219 : Promote impl_getPlatformImage to public API -// public static Object getPlatformImage(Image image) { -// return image.impl_getPlatformImage(); -// } // Deprecated stuff in FXMLLoader // RT-21226 : Promote setStaticLoad to public API public static void setStaticLoad(FXMLLoader loader, boolean staticLoad) { --- old/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/Utils.java 2016-04-29 10:53:59.841892400 -0700 +++ new/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/Utils.java 2016-04-29 10:53:59.425297400 -0700 @@ -48,6 +48,7 @@ import javafx.scene.control.MenuItem; import javafx.scene.control.OverrunStyle; import com.sun.javafx.scene.control.ContextMenuContent; +import com.sun.javafx.text.FontHelper; import java.net.URL; import javafx.scene.input.KeyCombination; import javafx.scene.input.Mnemonic; @@ -96,7 +97,7 @@ static final TextLayout layout = Toolkit.getToolkit().getTextLayoutFactory().createLayout(); public static double getAscent(Font font, TextBoundsType boundsType) { - layout.setContent("", font.impl_getNativeFont()); + layout.setContent("", FontHelper.getNativeFont(font)); layout.setWrapWidth(0); layout.setLineSpacing(0); if (boundsType == TextBoundsType.LOGICAL_VERTICAL_CENTER) { @@ -108,7 +109,7 @@ } public static double getLineHeight(Font font, TextBoundsType boundsType) { - layout.setContent("", font.impl_getNativeFont()); + layout.setContent("", FontHelper.getNativeFont(font)); layout.setWrapWidth(0); layout.setLineSpacing(0); if (boundsType == TextBoundsType.LOGICAL_VERTICAL_CENTER) { @@ -122,7 +123,7 @@ } public static double computeTextWidth(Font font, String text, double wrappingWidth) { - layout.setContent(text != null ? text : "", font.impl_getNativeFont()); + layout.setContent(text != null ? text : "", FontHelper.getNativeFont(font)); layout.setWrapWidth((float)wrappingWidth); return layout.getBounds().getWidth(); } @@ -133,7 +134,7 @@ @SuppressWarnings("deprecation") public static double computeTextHeight(Font font, String text, double wrappingWidth, double lineSpacing, TextBoundsType boundsType) { - layout.setContent(text != null ? text : "", font.impl_getNativeFont()); + layout.setContent(text != null ? text : "", FontHelper.getNativeFont(font)); layout.setWrapWidth((float)wrappingWidth); layout.setLineSpacing((float)lineSpacing); if (boundsType == TextBoundsType.LOGICAL_VERTICAL_CENTER) { --- old/modules/graphics/src/main/java/com/sun/javafx/font/PrismFontLoader.java 2016-04-29 10:54:01.922605700 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/font/PrismFontLoader.java 2016-04-29 10:54:01.575469500 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.javafx.font; +import com.sun.javafx.text.FontHelper; import javafx.scene.text.*; import com.sun.javafx.tk.*; import java.lang.reflect.Method; @@ -103,11 +104,11 @@ @SuppressWarnings("deprecation") private Font createFont(PGFont font) { - return Font.impl_NativeFont(font, - font.getName(), - font.getFamilyName(), - font.getStyleName(), - font.getSize()); + return FontHelper.nativeFont(font, + font.getName(), + font.getFamilyName(), + font.getStyleName(), + font.getSize()); } /** @@ -181,9 +182,9 @@ PGFont prismFont = fontFactory.createFont(family, bold, italic, size); // Create Font and set implementation - Font fxFont = Font.impl_NativeFont(prismFont, prismFont.getName(), - prismFont.getFamilyName(), - prismFont.getStyleName(), size); + Font fxFont = FontHelper.nativeFont(prismFont, prismFont.getName(), + prismFont.getFamilyName(), + prismFont.getStyleName(), size); return fxFont; } @@ -208,12 +209,12 @@ String name = prismFont.getName(); String family = prismFont.getFamilyName(); String style = prismFont.getStyleName(); - font.impl_setNativeFont(prismFont, name, family, style); + FontHelper.setNativeFont(font, prismFont, name, family, style); } @Override public FontMetrics getFontMetrics(Font font) { if (font != null) { - PGFont prismFont = (PGFont)font.impl_getNativeFont(); + PGFont prismFont = (PGFont) FontHelper.getNativeFont(font); Metrics metrics = PrismFontUtils.getFontMetrics(prismFont); // TODO: what's the difference between ascent and maxAscent? float maxAscent = -metrics.getAscent();//metrics.getMaxAscent(); @@ -230,7 +231,7 @@ } @Override public float getCharWidth(char ch, Font font) { - PGFont prismFont = (PGFont)font.impl_getNativeFont(); + PGFont prismFont = (PGFont) FontHelper.getNativeFont(font); return (float)PrismFontUtils.getCharWidth(prismFont, ch); } --- old/modules/graphics/src/main/java/com/sun/javafx/scene/input/DragboardHelper.java 2016-04-29 10:54:04.011078800 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/scene/input/DragboardHelper.java 2016-04-29 10:54:03.663204300 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.javafx.scene.input; +import com.sun.javafx.tk.TKClipboard; import javafx.scene.input.Dragboard; /** @@ -45,6 +46,14 @@ dragboardAccessor.setDataAccessRestriction(dragboard, restricted); } + public static TKClipboard getPeer(Dragboard dragboard) { + return dragboardAccessor.getPeer(dragboard); + } + + public static Dragboard createDragboard(TKClipboard peer) { + return dragboardAccessor.createDragboard(peer); + } + public static void setDragboardAccessor(final DragboardAccessor newAccessor) { if (dragboardAccessor != null) { throw new IllegalStateException(); @@ -55,6 +64,8 @@ public interface DragboardAccessor { void setDataAccessRestriction(Dragboard dragboard, boolean restricted); + TKClipboard getPeer(Dragboard dragboard); + Dragboard createDragboard(TKClipboard peer); } private static void forceInit(final Class classToInit) { --- old/modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGCanvas.java 2016-04-29 10:54:06.051779200 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGCanvas.java 2016-04-29 10:54:05.682674600 -0700 @@ -45,6 +45,7 @@ import com.sun.javafx.geom.transform.Affine2D; import com.sun.javafx.geom.transform.BaseTransform; import com.sun.javafx.geom.transform.NoninvertibleTransformException; +import com.sun.javafx.text.FontHelper; import com.sun.javafx.text.PrismTextLayout; import com.sun.javafx.tk.RenderJob; import com.sun.javafx.tk.ScreenConfigurationAccessor; @@ -386,7 +387,7 @@ path.setWindingRule(Path2D.WIND_NON_ZERO); // ngtext stores no state between render operations // textLayout stores no state between render operations - pgfont = (PGFont) Font.getDefault().impl_getNativeFont(); + pgfont = (PGFont) FontHelper.getNativeFont(Font.getDefault()); smoothing = SMOOTH_GRAY; align = ALIGN_LEFT; baseline = VPos.BASELINE.ordinal(); --- old/modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGRegion.java 2016-04-29 10:54:08.345915300 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGRegion.java 2016-04-29 10:54:07.960327800 -0700 @@ -714,7 +714,7 @@ final List images = background.getImages(); for (int i = 0, max = images.size(); i < max; i++) { final BackgroundImage image = images.get(i); - final Image prismImage = (Image) image.getImage().impl_getPlatformImage(); + final Image prismImage = (Image) Toolkit.getImageAccessor().getPlatformImage(image.getImage()); if (prismImage == null) { // The prismImage might be null if the Image has not completed loading. // In that case, we simply must skip rendering of that layer this @@ -851,7 +851,7 @@ final List images = background.getImages(); for (int i = 0, max = images.size(); i < max; i++) { final BackgroundImage image = images.get(i); - Image prismImage = (Image) image.getImage().impl_getPlatformImage(); + Image prismImage = (Image) Toolkit.getImageAccessor().getPlatformImage(image.getImage()); if (prismImage == null) { // The prismImage might be null if the Image has not completed loading. // In that case, we simply must skip rendering of that layer this @@ -1314,7 +1314,7 @@ for (int i = 0, max = images.size(); i < max; i++) { final BorderImage ib = images.get(i); - final Image prismImage = (Image) ib.getImage().impl_getPlatformImage(); + final Image prismImage = (Image) Toolkit.getImageAccessor().getPlatformImage(ib.getImage()); if (prismImage == null) { // The prismImage might be null if the Image has not completed loading. // In that case, we simply must skip rendering of that layer this --- old/modules/graphics/src/main/java/com/sun/javafx/tk/Toolkit.java 2016-04-29 10:54:10.647724100 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/tk/Toolkit.java 2016-04-29 10:54:10.278551200 -0700 @@ -808,7 +808,7 @@ * @param context a ImageRenderingContext instance specifying * the various rendering parameters * @return a platform specific image object - * @see javafx.scene.image.Image#impl_fromPlatformImage + * @see Toolkit.getImageAccessor().fromPlatformImage */ public abstract Object renderToImage(ImageRenderingContext context); @@ -948,6 +948,8 @@ public ReadOnlyObjectPropertygetImageProperty(Image image); public int[] getPreColors(PixelFormat pf); public int[] getNonPreColors(PixelFormat pf); + public Object getPlatformImage(Image image); + public Image fromPlatformImage(Object image); } private static ImageAccessor imageAccessor = null; --- old/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/GlassSystemMenu.java 2016-04-29 10:54:12.819075100 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/GlassSystemMenu.java 2016-04-29 10:54:12.471637700 -0700 @@ -38,6 +38,7 @@ import com.sun.glass.ui.MenuBar; import com.sun.glass.ui.MenuItem; import com.sun.glass.ui.Pixels; +import com.sun.javafx.tk.Toolkit; import java.util.List; @@ -297,7 +298,7 @@ String url = im.getUrl(); if (url == null || PixelUtils.supportedFormatType(url)) { - com.sun.prism.Image pi = (com.sun.prism.Image)im.impl_getPlatformImage(); + com.sun.prism.Image pi = (com.sun.prism.Image) Toolkit.getImageAccessor().getPlatformImage(im); return pi == null ? null : PixelUtils.imageToPixels(pi); } --- old/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumClipboard.java 2016-04-29 10:54:14.912114400 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumClipboard.java 2016-04-29 10:54:14.564624300 -0700 @@ -356,7 +356,7 @@ pixels); ImageLoader il = Toolkit.getToolkit().loadPlatformImage( platformImage); - return Image.impl_fromPlatformImage(il); + return Toolkit.getImageAccessor().fromPlatformImage(il); } } @@ -438,7 +438,7 @@ String url = image.getUrl(); if (url == null || PixelUtils.supportedFormatType(url)) { com.sun.prism.Image prismImage = - (com.sun.prism.Image)image.impl_getPlatformImage(); + (com.sun.prism.Image) Toolkit.getImageAccessor().getPlatformImage(image); Pixels pixels = PixelUtils.imageToPixels(prismImage); if (pixels != null) { systemAssistant.setData(Clipboard.RAW_IMAGE_TYPE, pixels); --- old/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java 2016-04-29 10:54:16.958673700 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java 2016-04-29 10:54:16.610913700 -0700 @@ -129,6 +129,7 @@ import com.sun.scenario.effect.impl.prism.PrImage; import com.sun.javafx.logging.PulseLogger; import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGING_ENABLED; +import com.sun.javafx.scene.input.DragboardHelper; import com.sun.prism.impl.ManagedResource; public final class QuantumToolkit extends Toolkit { @@ -896,7 +897,8 @@ if (paint.getImage() == null) { return com.sun.prism.paint.Color.TRANSPARENT; } else { - return new com.sun.prism.paint.ImagePattern((com.sun.prism.Image) paint.getImage().impl_getPlatformImage(), + return new com.sun.prism.paint.ImagePattern( + (com.sun.prism.Image) Toolkit.getImageAccessor().getPlatformImage(paint.getImage()), (float)paint.getX(), (float)paint.getY(), (float)paint.getWidth(), @@ -1055,7 +1057,7 @@ } @Override public Filterable toFilterable(Image img) { - return PrImage.create((com.sun.prism.Image) img.impl_getPlatformImage()); + return PrImage.create((com.sun.prism.Image) Toolkit.getImageAccessor().getPlatformImage(img)); } @Override public FilterContext getFilterContext(Object config) { @@ -1218,7 +1220,7 @@ GlassScene view = (GlassScene)scene; view.setTKDragSourceListener(l); - QuantumClipboard gc = (QuantumClipboard)dragboard.impl_getPeer(); + QuantumClipboard gc = (QuantumClipboard) DragboardHelper.getPeer(dragboard); gc.setSupportedTransferMode(tm); gc.flush(); --- old/modules/graphics/src/main/java/com/sun/scenario/effect/EffectHelper.java 2016-04-29 10:54:19.100426700 -0700 +++ new/modules/graphics/src/main/java/com/sun/scenario/effect/EffectHelper.java 2016-04-29 10:54:18.745985300 -0700 @@ -30,6 +30,8 @@ import com.sun.javafx.scene.BoundsAccessor; import javafx.beans.property.IntegerProperty; import javafx.scene.Node; +import javafx.scene.effect.Blend; +import javafx.scene.effect.BlendMode; /** * Used to access internal methods of javafx.scene.effect.Effect. @@ -69,6 +71,11 @@ public static javafx.scene.effect.Effect copy(javafx.scene.effect.Effect effect) { return effectAccessor.copy(effect); } + + public static com.sun.scenario.effect.Blend.Mode getToolkitBlendMode(BlendMode mode) { + return effectAccessor.getToolkitBlendMode(mode); + } + public static void setEffectAccessor(final EffectAccessor newAccessor) { if (effectAccessor != null) { throw new IllegalStateException(); @@ -85,6 +92,7 @@ BaseBounds getBounds(javafx.scene.effect.Effect effect, BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor); javafx.scene.effect.Effect copy(javafx.scene.effect.Effect effect); + com.sun.scenario.effect.Blend.Mode getToolkitBlendMode(javafx.scene.effect.BlendMode mode); } private static void forceInit(final Class classToInit) { --- old/modules/graphics/src/main/java/javafx/animation/Animation.java 2016-04-29 10:54:21.205533000 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/Animation.java 2016-04-29 10:54:20.835884300 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -183,7 +183,7 @@ } AccessController.doPrivileged((PrivilegedAction) () -> { - impl_timePulse(elapsedTime); + doTimePulse(elapsedTime); return null; }, accessCtrlCtx); } @@ -311,17 +311,17 @@ lastPlayedForward = (Math.abs(getCurrentRate() - oldRate) < EPSILON); } - setCurrentRate(0.0); + doSetCurrentRate(0.0); pauseReceiver(); } else { if (getStatus() == Status.RUNNING) { final double currentRate = getCurrentRate(); if (Math.abs(currentRate) < EPSILON) { - setCurrentRate(lastPlayedForward ? newRate : -newRate); + doSetCurrentRate(lastPlayedForward ? newRate : -newRate); resumeReceiver(); } else { final boolean playingForward = Math.abs(currentRate - oldRate) < EPSILON; - setCurrentRate(playingForward ? newRate : -newRate); + doSetCurrentRate(playingForward ? newRate : -newRate); } } oldRate = newRate; @@ -366,7 +366,7 @@ private ReadOnlyDoubleProperty currentRate; private static final double DEFAULT_CURRENT_RATE = 0.0; - private void setCurrentRate(double value) { + private void doSetCurrentRate(double value) { if ((currentRate != null) || (Math.abs(value - DEFAULT_CURRENT_RATE) > EPSILON)) { ((CurrentRateProperty)currentRateProperty()).set(value); } @@ -904,12 +904,12 @@ } switch (getStatus()) { case STOPPED: - if (impl_startable(true)) { + if (startable(true)) { final double rate = getRate(); if (lastPlayedFinished) { jumpTo((rate < 0)? getTotalDuration() : Duration.ZERO); } - impl_start(true); + doStart(true); startReceiver(TickCalculation.fromDuration(getDelay())); if (Math.abs(rate) < EPSILON) { pauseReceiver(); @@ -924,7 +924,7 @@ } break; case PAUSED: - impl_resume(); + doResume(); if (Math.abs(getRate()) >= EPSILON) { resumeReceiver(); } @@ -978,7 +978,7 @@ } if (getStatus() != Status.STOPPED) { clipEnvelope.abortCurrentPulse(); - impl_stop(); + doStop(); jumpTo(Duration.ZERO); } } @@ -1001,7 +1001,7 @@ if (getStatus() == Status.RUNNING) { clipEnvelope.abortCurrentPulse(); pauseReceiver(); - impl_pause(); + doPause(); } } @@ -1047,12 +1047,12 @@ this.timer = timer; } - boolean impl_startable(boolean forceSync) { + boolean startable(boolean forceSync) { return (fromDuration(getCycleDuration()) > 0L) || (!forceSync && clipEnvelope.wasSynched()); } - void impl_sync(boolean forceSync) { + void sync(boolean forceSync) { if (forceSync || !clipEnvelope.wasSynched()) { syncClipEnvelope(); } @@ -1067,37 +1067,37 @@ clipEnvelope.setAutoReverse(isAutoReverse()); } - void impl_start(boolean forceSync) { - impl_sync(forceSync); + void doStart(boolean forceSync) { + sync(forceSync); setStatus(Status.RUNNING); clipEnvelope.start(); - setCurrentRate(clipEnvelope.getCurrentRate()); + doSetCurrentRate(clipEnvelope.getCurrentRate()); lastPulse = 0; } - void impl_pause() { + void doPause() { final double currentRate = getCurrentRate(); if (Math.abs(currentRate) >= EPSILON) { lastPlayedForward = Math.abs(getCurrentRate() - getRate()) < EPSILON; } - setCurrentRate(0.0); + doSetCurrentRate(0.0); setStatus(Status.PAUSED); } - void impl_resume() { + void doResume() { setStatus(Status.RUNNING); - setCurrentRate(lastPlayedForward ? getRate() : -getRate()); + doSetCurrentRate(lastPlayedForward ? getRate() : -getRate()); } - void impl_stop() { + void doStop() { if (!paused) { timer.removePulseReceiver(pulseReceiver); } setStatus(Status.STOPPED); - setCurrentRate(0.0); + doSetCurrentRate(0.0); } - void impl_timePulse(long elapsedTime) { + void doTimePulse(long elapsedTime) { if (resolution == 1) { // fullspeed clipEnvelope.timePulse(elapsedTime); } else if (elapsedTime - lastPulse >= resolution) { @@ -1106,26 +1106,26 @@ } } - abstract void impl_playTo(long currentTicks, long cycleTicks); + abstract void doPlayTo(long currentTicks, long cycleTicks); - abstract void impl_jumpTo(long currentTicks, long cycleTicks, boolean forceJump); + abstract void doJumpTo(long currentTicks, long cycleTicks, boolean forceJump); - void impl_setCurrentTicks(long ticks) { + void setCurrentTicks(long ticks) { currentTicks = ticks; if (currentTime != null) { currentTime.fireValueChangedEvent(); } } - void impl_setCurrentRate(double currentRate) { + void setCurrentRate(double currentRate) { // if (getStatus() == Status.RUNNING) { - setCurrentRate(currentRate); + doSetCurrentRate(currentRate); // } } - final void impl_finished() { + final void finished() { lastPlayedFinished = true; - impl_stop(); + doStop(); final EventHandler handler = getOnFinished(); if (handler != null) { try { --- old/modules/graphics/src/main/java/javafx/animation/AnimationAccessorImpl.java 2016-04-29 10:54:23.310208900 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/AnimationAccessorImpl.java 2016-04-29 10:54:22.971379300 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,27 +31,27 @@ @Override public void setCurrentRate(Animation animation, double currentRate) { - animation.impl_setCurrentRate(currentRate); + animation.setCurrentRate(currentRate); } @Override public void playTo(Animation animation, long pos, long cycleTicks) { - animation.impl_playTo(pos, cycleTicks); + animation.doPlayTo(pos, cycleTicks); } @Override public void jumpTo(Animation animation, long pos, long cycleTicks, boolean forceJump) { - animation.impl_jumpTo(pos, cycleTicks, forceJump); + animation.doJumpTo(pos, cycleTicks, forceJump); } @Override public void finished(Animation animation) { - animation.impl_finished(); + animation.finished(); } @Override public void setCurrentTicks(Animation animation, long ticks) { - animation.impl_setCurrentTicks(ticks); + animation.setCurrentTicks(ticks); } --- old/modules/graphics/src/main/java/javafx/animation/FadeTransition.java 2016-04-29 10:54:25.391399100 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/FadeTransition.java 2016-04-29 10:54:25.059316700 -0700 @@ -315,14 +315,14 @@ } @Override - boolean impl_startable(boolean forceSync) { - return super.impl_startable(forceSync) + boolean startable(boolean forceSync) { + return super.startable(forceSync) && ((getTargetNode() != null) || (!forceSync && (cachedNode != null))); } @Override - void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + void sync(boolean forceSync) { + super.sync(forceSync); if (forceSync || (cachedNode == null)) { cachedNode = getTargetNode(); final double _fromValue = getFromValue(); --- old/modules/graphics/src/main/java/javafx/animation/FillTransition.java 2016-04-29 10:54:27.415877300 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/FillTransition.java 2016-04-29 10:54:27.077660600 -0700 @@ -308,8 +308,8 @@ } @Override - boolean impl_startable(boolean forceSync) { - if (!super.impl_startable(forceSync)) { + boolean startable(boolean forceSync) { + if (!super.startable(forceSync)) { return false; } // check if synchronization is not forced and cached values are valid @@ -331,8 +331,8 @@ } @Override - void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + void sync(boolean forceSync) { + super.sync(forceSync); if (forceSync || (cachedShape == null)) { cachedShape = getTargetShape(); final Color _fromValue = getFromValue(); --- old/modules/graphics/src/main/java/javafx/animation/ParallelTransition.java 2016-04-29 10:54:29.456412400 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/ParallelTransition.java 2016-04-29 10:54:29.124627700 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -337,9 +337,9 @@ private boolean startChild(Animation child, int index) { final boolean forceSync = forceChildSync[index]; - if (child.impl_startable(forceSync)) { + if (child.startable(forceSync)) { child.clipEnvelope.setRate(rates[index] * Math.signum(getCurrentRate())); - child.impl_start(forceSync); + child.doStart(forceSync); forceChildSync[index] = false; return true; } @@ -347,8 +347,8 @@ } @Override - void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + void sync(boolean forceSync) { + super.sync(forceSync); if ((forceSync && childrenChanged) || (durations == null)) { cachedChildren = getChildren().toArray(EMPTY_ANIMATION_ARRAY); final int n = cachedChildren.length; @@ -380,22 +380,22 @@ } @Override - void impl_pause() { - super.impl_pause(); + void doPause() { + super.doPause(); for (final Animation animation : cachedChildren) { if (animation.getStatus() == Status.RUNNING) { - animation.impl_pause(); + animation.doPause(); } } } @Override - void impl_resume() { - super.impl_resume(); + void doResume() { + super.doResume(); int i = 0; for (final Animation animation : cachedChildren) { if (animation.getStatus() == Status.PAUSED) { - animation.impl_resume(); + animation.doResume(); animation.clipEnvelope.setRate(rates[i] * Math.signum(getCurrentRate())); } i++; @@ -403,8 +403,8 @@ } @Override - void impl_start(boolean forceSync) { - super.impl_start(forceSync); + void doStart(boolean forceSync) { + super.doStart(forceSync); toggledRate = false; rateProperty().addListener(rateListener); double curRate = getCurrentRate(); @@ -412,22 +412,22 @@ if (curRate < 0) { jumpToEnd(); if (currentTicks < cycleTime) { - impl_jumpTo(currentTicks, cycleTime, false); + doJumpTo(currentTicks, cycleTime, false); } } else { jumpToStart(); if (currentTicks > 0) { - impl_jumpTo(currentTicks, cycleTime, false); + doJumpTo(currentTicks, cycleTime, false); } } } @Override - void impl_stop() { - super.impl_stop(); + void doStop() { + super.doStop(); for (final Animation animation : cachedChildren) { if (animation.getStatus() != Status.STOPPED) { - animation.impl_stop(); + animation.doStop(); } } if (childrenChanged) { @@ -436,14 +436,9 @@ rateProperty().removeListener(rateListener); } - - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - @Override public void impl_playTo(long currentTicks, long cycleTicks) { - impl_setCurrentTicks(currentTicks); + @Override + void doPlayTo(long currentTicks, long cycleTicks) { + setCurrentTicks(currentTicks); final double frac = calculateFraction(currentTicks, cycleTicks); final long newTicks = Math.max(0, Math.min(getCachedInterpolator().interpolate(0, cycleTicks, frac), cycleTicks)); if (toggledRate) { @@ -474,11 +469,11 @@ } if (newTicks >= add(durations[i], delays[i])) { if (animation.getStatus() == Status.RUNNING) { - animation.impl_timePulse(sub(durations[i], offsetTicks[i])); + animation.doTimePulse(sub(durations[i], offsetTicks[i])); offsetTicks[i] = 0; } } else if (newTicks > delays[i]) { - animation.impl_timePulse(sub(newTicks - delays[i], offsetTicks[i])); + animation.doTimePulse(sub(newTicks - delays[i], offsetTicks[i])); } i++; } @@ -502,11 +497,11 @@ } if (newTicks <= delays[i]) { if (animation.getStatus() == Status.RUNNING) { - animation.impl_timePulse(sub(durations[i], offsetTicks[i])); + animation.doTimePulse(sub(durations[i], offsetTicks[i])); offsetTicks[i] = 0; } } else { - animation.impl_timePulse(sub( add(durations[i], delays[i]) - newTicks, offsetTicks[i])); + animation.doTimePulse(sub( add(durations[i], delays[i]) - newTicks, offsetTicks[i])); } } i++; @@ -515,17 +510,13 @@ oldTicks = newTicks; } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - @Override public void impl_jumpTo(long currentTicks, long cycleTicks, boolean forceJump) { - impl_setCurrentTicks(currentTicks); + @Override + void doJumpTo(long currentTicks, long cycleTicks, boolean forceJump) { + setCurrentTicks(currentTicks); if (getStatus() == Status.STOPPED && !forceJump) { return; } - impl_sync(false); + sync(false); final double frac = calculateFraction(currentTicks, cycleTicks); final long newTicks = Math.max(0, Math.min(getCachedInterpolator().interpolate(0, cycleTicks, frac), cycleTicks)); int i = 0; @@ -535,23 +526,23 @@ offsetTicks[i] = 0; if (status != Status.STOPPED) { animation.clipEnvelope.jumpTo(0); - animation.impl_stop(); + animation.doStop(); } else if(TickCalculation.fromDuration(animation.getCurrentTime()) != 0) { - animation.impl_jumpTo(0, durations[i], true); + animation.doJumpTo(0, durations[i], true); } } else if (newTicks >= add(durations[i], delays[i])) { offsetTicks[i] = 0; if (status != Status.STOPPED) { animation.clipEnvelope.jumpTo(Math.round(durations[i] * rates[i])); - animation.impl_stop(); + animation.doStop(); } else if (TickCalculation.fromDuration(animation.getCurrentTime()) != durations[i]) { - animation.impl_jumpTo(durations[i], durations[i], true); + animation.doJumpTo(durations[i], durations[i], true); } } else { if (status == Status.STOPPED) { startChild(animation, i); if (getStatus() == Status.PAUSED) { - animation.impl_pause(); + animation.doPause(); } offsetTicks[i] = (getCurrentRate() > 0)? newTicks - delays[i] : add(durations[i], delays[i]) - newTicks; @@ -579,18 +570,18 @@ for (int i = 0 ; i < cachedChildren.length; ++i) { if (forceChildSync[i]) { // See explanation in SequentialTransition#jumpToEnd - cachedChildren[i].impl_sync(true); + cachedChildren[i].sync(true); } - cachedChildren[i].impl_jumpTo(durations[i], durations[i], true); + cachedChildren[i].doJumpTo(durations[i], durations[i], true); } } private void jumpToStart() { for (int i = cachedChildren.length - 1 ; i >= 0; --i) { if (forceChildSync[i]) { - cachedChildren[i].impl_sync(true); + cachedChildren[i].sync(true); } - cachedChildren[i].impl_jumpTo(0, durations[i], true); + cachedChildren[i].doJumpTo(0, durations[i], true); } } --- old/modules/graphics/src/main/java/javafx/animation/PathTransition.java 2016-04-29 10:54:31.547401200 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/PathTransition.java 2016-04-29 10:54:31.198453000 -0700 @@ -354,15 +354,15 @@ } @Override - boolean impl_startable(boolean forceSync) { - return super.impl_startable(forceSync) + boolean startable(boolean forceSync) { + return super.startable(forceSync) && (((getTargetNode() != null) && (getPath() != null) && !getPath().getLayoutBounds().isEmpty()) || (!forceSync && (cachedNode != null))); } @Override - void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + void sync(boolean forceSync) { + super.sync(forceSync); if (forceSync || (cachedNode == null)) { cachedNode = getTargetNode(); recomputeSegments(); --- old/modules/graphics/src/main/java/javafx/animation/RotateTransition.java 2016-04-29 10:54:33.627449300 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/RotateTransition.java 2016-04-29 10:54:33.279275600 -0700 @@ -347,14 +347,14 @@ } @Override - boolean impl_startable(boolean forceSync) { - return super.impl_startable(forceSync) + boolean startable(boolean forceSync) { + return super.startable(forceSync) && ((getTargetNode() != null) || (!forceSync && (cachedNode != null))); } @Override - void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + void sync(boolean forceSync) { + super.sync(forceSync); if (forceSync || (cachedNode == null)) { cachedNode = getTargetNode(); final double _fromAngle = getFromAngle(); --- old/modules/graphics/src/main/java/javafx/animation/ScaleTransition.java 2016-04-29 10:54:35.737012000 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/ScaleTransition.java 2016-04-29 10:54:35.373468300 -0700 @@ -507,14 +507,14 @@ } @Override - boolean impl_startable(boolean forceSync) { - return super.impl_startable(forceSync) + boolean startable(boolean forceSync) { + return super.startable(forceSync) && ((getTargetNode() != null) || (!forceSync && (cachedNode != null))); } @Override - void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + void sync(boolean forceSync) { + super.sync(forceSync); if (forceSync || (cachedNode == null)) { cachedNode = getTargetNode(); --- old/modules/graphics/src/main/java/javafx/animation/SequentialTransition.java 2016-04-29 10:54:37.774398100 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/SequentialTransition.java 2016-04-29 10:54:37.426408100 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -354,8 +354,8 @@ } @Override - void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + void sync(boolean forceSync) { + super.sync(forceSync); if ((forceSync && childrenChanged) || (startTimes == null)) { cachedChildren = getChildren().toArray(EMPTY_ANIMATION_ARRAY); @@ -394,8 +394,8 @@ } @Override - void impl_start(boolean forceSync) { - super.impl_start(forceSync); + void doStart(boolean forceSync) { + super.doStart(forceSync); toggledRate = false; rateProperty().addListener(rateListener); offsetTicks = 0L; @@ -405,47 +405,47 @@ jumpToEnd(); curIndex = end; if (currentTicks < startTimes[end]) { - impl_jumpTo(currentTicks, startTimes[end], false); + doJumpTo(currentTicks, startTimes[end], false); } } else { jumpToBefore(); curIndex = BEFORE; if (currentTicks > 0) { - impl_jumpTo(currentTicks, startTimes[end], false); + doJumpTo(currentTicks, startTimes[end], false); } } } @Override - void impl_pause() { - super.impl_pause(); + void doPause() { + super.doPause(); if ((curIndex != BEFORE) && (curIndex != end)) { final Animation current = cachedChildren[curIndex]; if (current.getStatus() == Status.RUNNING) { - current.impl_pause(); + current.doPause(); } } } @Override - void impl_resume() { - super.impl_resume(); + void doResume() { + super.doResume(); if ((curIndex != BEFORE) && (curIndex != end)) { final Animation current = cachedChildren[curIndex]; if (current.getStatus() == Status.PAUSED) { - current.impl_resume(); + current.doResume(); current.clipEnvelope.setRate(rates[curIndex] * Math.signum(getCurrentRate())); } } } @Override - void impl_stop() { - super.impl_stop(); + void doStop() { + super.doStop(); if ((curIndex != BEFORE) && (curIndex != end)) { final Animation current = cachedChildren[curIndex]; if (current.getStatus() != Status.STOPPED) { - current.impl_stop(); + current.doStop(); } } if (childrenChanged) { @@ -456,17 +456,17 @@ private boolean startChild(Animation child, int index) { final boolean forceSync = forceChildSync[index]; - if (child.impl_startable(forceSync)) { + if (child.startable(forceSync)) { child.clipEnvelope.setRate(rates[index] * Math.signum(getCurrentRate())); - child.impl_start(forceSync); + child.doStart(forceSync); forceChildSync[index] = false; return true; } return false; } - @Override void impl_playTo(long currentTicks, long cycleTicks) { - impl_setCurrentTicks(currentTicks); + @Override void doPlayTo(long currentTicks, long cycleTicks) { + setCurrentTicks(currentTicks); final double frac = calculateFraction(currentTicks, cycleTicks); final long newTicks = Math.max(0, Math.min(getCachedInterpolator().interpolate(0, cycleTicks, frac), cycleTicks)); final int newIndex = findNewIndex(newTicks); @@ -498,13 +498,13 @@ } } if (newTicks >= startTimes[curIndex+1]) { - current.impl_timePulse(sub(durations[curIndex], offsetTicks)); + current.doTimePulse(sub(durations[curIndex], offsetTicks)); if (newTicks == cycleTicks) { curIndex = end; } } else { final long localTicks = sub(newTicks - currentDelay, offsetTicks); - current.impl_timePulse(localTicks); + current.doTimePulse(localTicks); } } } else { // getCurrentRate() < 0 @@ -526,13 +526,13 @@ } } if (newTicks <= currentDelay) { - current.impl_timePulse(sub(durations[curIndex], offsetTicks)); + current.doTimePulse(sub(durations[curIndex], offsetTicks)); if (newTicks == 0) { curIndex = BEFORE; } } else { final long localTicks = sub(startTimes[curIndex + 1] - newTicks, offsetTicks); - current.impl_timePulse(localTicks); + current.doTimePulse(localTicks); } } } else { // curIndex != newIndex @@ -554,7 +554,7 @@ } } if (current.getStatus() == Status.RUNNING) { - current.impl_timePulse(sub(durations[curIndex], offsetTicks)); + current.doTimePulse(sub(durations[curIndex], offsetTicks)); } oldTicks = startTimes[curIndex + 1]; } @@ -564,7 +564,7 @@ final Animation animation = cachedChildren[curIndex]; animation.clipEnvelope.jumpTo(0); if (startChild(animation, curIndex)) { - animation.impl_timePulse(durations[curIndex]); // No need to subtract offsetTicks ( == 0) + animation.doTimePulse(durations[curIndex]); // No need to subtract offsetTicks ( == 0) } else { final EventHandler handler = animation.getOnFinished(); if (handler != null) { @@ -577,13 +577,13 @@ newAnimation.clipEnvelope.jumpTo(0); if (startChild(newAnimation, curIndex)) { if (newTicks >= startTimes[curIndex+1]) { - newAnimation.impl_timePulse(durations[curIndex]); // No need to subtract offsetTicks ( == 0) + newAnimation.doTimePulse(durations[curIndex]); // No need to subtract offsetTicks ( == 0) if (newTicks == cycleTicks) { curIndex = end; } } else { final long localTicks = sub(newTicks, add(startTimes[curIndex], delays[curIndex])); - newAnimation.impl_timePulse(localTicks); + newAnimation.doTimePulse(localTicks); } } else { final EventHandler handler = newAnimation.getOnFinished(); @@ -609,7 +609,7 @@ } } if (current.getStatus() == Status.RUNNING) { - current.impl_timePulse(sub(durations[curIndex], offsetTicks)); + current.doTimePulse(sub(durations[curIndex], offsetTicks)); } oldTicks = startTimes[curIndex]; } @@ -619,7 +619,7 @@ final Animation animation = cachedChildren[curIndex]; animation.clipEnvelope.jumpTo(Math.round(durations[curIndex] * rates[curIndex])); if (startChild(animation, curIndex)) { - animation.impl_timePulse(durations[curIndex]); // No need to subtract offsetTicks ( == 0) + animation.doTimePulse(durations[curIndex]); // No need to subtract offsetTicks ( == 0) } else { final EventHandler handler = animation.getOnFinished(); if (handler != null) { @@ -632,13 +632,13 @@ newAnimation.clipEnvelope.jumpTo(Math.round(durations[curIndex] * rates[curIndex])); if (startChild(newAnimation, curIndex)) { if (newTicks <= add(startTimes[curIndex], delays[curIndex])) { - newAnimation.impl_timePulse(durations[curIndex]); // No need to subtract offsetTicks ( == 0) + newAnimation.doTimePulse(durations[curIndex]); // No need to subtract offsetTicks ( == 0) if (newTicks == 0) { curIndex = BEFORE; } } else { final long localTicks = sub(startTimes[curIndex + 1], newTicks); - newAnimation.impl_timePulse(localTicks); + newAnimation.doTimePulse(localTicks); } } else { final EventHandler handler = newAnimation.getOnFinished(); @@ -651,15 +651,15 @@ oldTicks = newTicks; } - @Override void impl_jumpTo(long currentTicks, long cycleTicks, boolean forceJump) { - impl_setCurrentTicks(currentTicks); + @Override void doJumpTo(long currentTicks, long cycleTicks, boolean forceJump) { + setCurrentTicks(currentTicks); final Status status = getStatus(); if (status == Status.STOPPED && !forceJump) { return; } - impl_sync(false); + sync(false); final double frac = calculateFraction(currentTicks, cycleTicks); final long newTicks = Math.max(0, Math.min(getCachedInterpolator().interpolate(0, cycleTicks, frac), cycleTicks)); final int oldIndex = curIndex; @@ -672,22 +672,22 @@ if ((oldIndex != BEFORE) && (oldIndex != end)) { final Animation oldChild = cachedChildren[oldIndex]; if (oldChild.getStatus() != Status.STOPPED) { - cachedChildren[oldIndex].impl_stop(); + cachedChildren[oldIndex].doStop(); } } if (curIndex < oldIndex) { for (int i = oldIndex == end ? end - 1 : oldIndex; i > curIndex; --i) { - cachedChildren[i].impl_jumpTo(0, durations[i], true); + cachedChildren[i].doJumpTo(0, durations[i], true); } } else { //curIndex > oldIndex as curIndex != oldIndex for (int i = oldIndex == BEFORE? 0 : oldIndex; i < curIndex; ++i) { - cachedChildren[i].impl_jumpTo(durations[i], durations[i], true); + cachedChildren[i].doJumpTo(durations[i], durations[i], true); } } if (newTicks >= currentDelay) { startChild(newAnimation, curIndex); if (status == Status.PAUSED) { - newAnimation.impl_pause(); + newAnimation.doPause(); } } } @@ -716,7 +716,7 @@ private void jumpToEnd() { for (int i = 0 ; i < end; ++i) { if (forceChildSync[i]) { - cachedChildren[i].impl_sync(true); + cachedChildren[i].sync(true); //NOTE: do not clean up forceChildSync[i] here. Another sync will be needed during the play // The reason is we have 2 different use-cases for jumping (1)play from start, (2)play next cycle. // and 2 different types of sub-transitions (A)"by" transitions that need to synchronize on @@ -731,7 +731,7 @@ // there might be children of (A)-"by" type that operate on the same property, but fail to synchronize // them when they start would mean they all would have the same value at the beginning. } - cachedChildren[i].impl_jumpTo(durations[i], durations[i], true); + cachedChildren[i].doJumpTo(durations[i], durations[i], true); } } @@ -739,11 +739,11 @@ private void jumpToBefore() { for (int i = end - 1 ; i >= 0; --i) { if (forceChildSync[i]) { - cachedChildren[i].impl_sync(true); + cachedChildren[i].sync(true); //NOTE: do not clean up forceChildSync[i] here. Another sync will be needed during the play // See explanation in jumpToEnd } - cachedChildren[i].impl_jumpTo(0, durations[i], true); + cachedChildren[i].doJumpTo(0, durations[i], true); } } --- old/modules/graphics/src/main/java/javafx/animation/StrokeTransition.java 2016-04-29 10:54:39.860500400 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/StrokeTransition.java 2016-04-29 10:54:39.528367200 -0700 @@ -309,8 +309,8 @@ } @Override - boolean impl_startable(boolean forceSync) { - if (!super.impl_startable(forceSync)) { + boolean startable(boolean forceSync) { + if (!super.startable(forceSync)) { return false; } // check if synchronization is not forced and cached values are valid @@ -333,8 +333,8 @@ } @Override - void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + void sync(boolean forceSync) { + super.sync(forceSync); if (forceSync || (cachedShape == null)) { cachedShape = getTargetShape(); final Color _fromValue = getFromValue(); --- old/modules/graphics/src/main/java/javafx/animation/Timeline.java 2016-04-29 10:54:41.883889600 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/Timeline.java 2016-04-29 10:54:41.552009000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -172,26 +172,26 @@ } @Override - void impl_playTo(long currentTicks, long cycleTicks) { + void doPlayTo(long currentTicks, long cycleTicks) { clipCore.playTo(currentTicks); } @Override - void impl_jumpTo(long currentTicks, long cycleTicks, boolean forceJump) { - impl_sync(false); - impl_setCurrentTicks(currentTicks); + void doJumpTo(long currentTicks, long cycleTicks, boolean forceJump) { + sync(false); + setCurrentTicks(currentTicks); clipCore.jumpTo(currentTicks, forceJump); } @Override - void impl_setCurrentRate(double currentRate) { - super.impl_setCurrentRate(currentRate); + void setCurrentRate(double currentRate) { + super.setCurrentRate(currentRate); clipCore.notifyCurrentRateChanged(); } @Override - void impl_start(boolean forceSync) { - super.impl_start(forceSync); + void doStart(boolean forceSync) { + super.doStart(forceSync); clipCore.start(forceSync); } --- old/modules/graphics/src/main/java/javafx/animation/Transition.java 2016-04-29 10:54:43.935208500 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/Transition.java 2016-04-29 10:54:43.587272200 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -191,30 +191,30 @@ } @Override - boolean impl_startable(boolean forceSync) { - return super.impl_startable(forceSync) + boolean startable(boolean forceSync) { + return super.startable(forceSync) && ((getInterpolator() != null) || (!forceSync && (cachedInterpolator != null))); } @Override - void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + void sync(boolean forceSync) { + super.sync(forceSync); if (forceSync || (cachedInterpolator == null)) { cachedInterpolator = getInterpolator(); } } @Override - void impl_playTo(long currentTicks, long cycleTicks) { - impl_setCurrentTicks(currentTicks); + void doPlayTo(long currentTicks, long cycleTicks) { + setCurrentTicks(currentTicks); interpolate(calculateFraction(currentTicks, cycleTicks)); } @Override - void impl_jumpTo(long currentTicks, long cycleTicks, boolean forceJump) { - impl_setCurrentTicks(currentTicks); + void doJumpTo(long currentTicks, long cycleTicks, boolean forceJump) { + setCurrentTicks(currentTicks); if (getStatus() != Status.STOPPED || forceJump) { - impl_sync(false); + sync(false); interpolate(calculateFraction(currentTicks, cycleTicks)); } } --- old/modules/graphics/src/main/java/javafx/animation/TranslateTransition.java 2016-04-29 10:54:46.009610500 -0700 +++ new/modules/graphics/src/main/java/javafx/animation/TranslateTransition.java 2016-04-29 10:54:45.645445800 -0700 @@ -508,14 +508,14 @@ } @Override - boolean impl_startable(boolean forceSync) { - return super.impl_startable(forceSync) + boolean startable(boolean forceSync) { + return super.startable(forceSync) && ((getTargetNode() != null) || (!forceSync && (cachedNode != null))); } @Override - void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + void sync(boolean forceSync) { + super.sync(forceSync); if (forceSync || (cachedNode == null)) { cachedNode = getTargetNode(); --- old/modules/graphics/src/main/java/javafx/scene/ImageCursor.java 2016-04-29 10:54:48.216955700 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/ImageCursor.java 2016-04-29 10:54:47.818778600 -0700 @@ -296,7 +296,7 @@ return currentCursorFrame; } - final Object cursorPlatformImage = cursorImage.impl_getPlatformImage(); + final Object cursorPlatformImage = Toolkit.getImageAccessor().getPlatformImage(cursorImage); if (cursorPlatformImage == null) { currentCursorFrame = Cursor.DEFAULT.getCurrentFrame(); return currentCursorFrame; --- old/modules/graphics/src/main/java/javafx/scene/Node.java 2016-04-29 10:54:50.352116800 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/Node.java 2016-04-29 10:54:49.970017400 -0700 @@ -647,7 +647,7 @@ BlendMode mode = getBlendMode(); peer.setNodeBlendMode((mode == null) ? null - : Blend.impl_getToolkitMode(mode)); + : EffectHelper.getToolkitBlendMode(mode)); } } --- old/modules/graphics/src/main/java/javafx/scene/Scene.java 2016-04-29 10:54:53.157861900 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/Scene.java 2016-04-29 10:54:52.772109900 -0700 @@ -94,6 +94,8 @@ import com.sun.javafx.logging.PulseLogger; import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGING_ENABLED; +import com.sun.javafx.scene.input.ClipboardHelper; +import com.sun.javafx.scene.input.TouchPointHelper; /** * The JavaFX {@code Scene} class is the container for all content in a scene graph. @@ -377,7 +379,7 @@ return parent.getChildren(); //was impl_getChildren } public Object renderToImage(Scene scene, Object platformImage) { - return scene.snapshot(null).impl_getPlatformImage(); + return Toolkit.getImageAccessor().getPlatformImage(scene.snapshot(null)); } }); SceneHelper.setSceneAccessor( @@ -1990,7 +1992,7 @@ } for (TouchPoint t : touchPoints) { - t.impl_reset(); + TouchPointHelper.reset(t); } TouchEvent te = new TouchEvent(type, tp, touchList, @@ -2938,7 +2940,7 @@ if (dndGesture == null) { dndGesture = new DnDGesture(); } - Dragboard db = Dragboard.impl_createDragboard(dragboard); + Dragboard db = DragboardHelper.createDragboard(dragboard); dndGesture.dragboard = db; DragEvent dragEvent = new DragEvent(DragEvent.ANY, dndGesture.dragboard, x, y, screenX, screenY, @@ -3024,7 +3026,7 @@ public void dragGestureRecognized(double x, double y, double screenX, double screenY, int button, TKClipboard dragboard) { - Dragboard db = Dragboard.impl_createDragboard(dragboard); + Dragboard db = DragboardHelper.createDragboard(dragboard); dndGesture = new DnDGesture(); dndGesture.dragboard = db; // TODO: support mouse buttons in DragEvent @@ -3080,7 +3082,7 @@ */ private void dragDetectedProcessed() { dragDetected = DragDetectedState.DONE; - final boolean hasContent = (dragboard != null) && (dragboard.impl_contentPut()); + final boolean hasContent = (dragboard != null) && (ClipboardHelper.contentPut(dragboard)); if (hasContent) { /* start DnD */ Toolkit.getToolkit().startDrag(Scene.this.peer, @@ -3419,7 +3421,7 @@ } } TKClipboard dragboardPeer = peer.createDragboard(isDragSource); - return Dragboard.impl_createDragboard(dragboardPeer); + return DragboardHelper.createDragboard(dragboardPeer); } } --- old/modules/graphics/src/main/java/javafx/scene/canvas/GraphicsContext.java 2016-04-29 10:54:55.661349500 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/canvas/GraphicsContext.java 2016-04-29 10:54:55.323058600 -0700 @@ -35,6 +35,7 @@ import com.sun.javafx.image.impl.ByteBgraPre; import com.sun.javafx.sg.prism.GrowableDataBuffer; import com.sun.javafx.sg.prism.NGCanvas; +import com.sun.javafx.text.FontHelper; import com.sun.javafx.tk.Toolkit; import com.sun.scenario.effect.EffectHelper; import javafx.geometry.NodeOrientation; @@ -748,7 +749,7 @@ double dx, double dy, double dw, double dh) { if (img == null || img.getProgress() < 1.0) return; - Object platformImg = img.impl_getPlatformImage(); + Object platformImg = Toolkit.getImageAccessor().getPlatformImage(img); if (platformImg == null) return; updateTransform(); GrowableDataBuffer buf = getBuffer(); @@ -761,7 +762,7 @@ double sx, double sy, double sw, double sh) { if (img == null || img.getProgress() < 1.0) return; - Object platformImg = img.impl_getPlatformImage(); + Object platformImg = Toolkit.getImageAccessor().getPlatformImage(img); if (platformImg == null) return; updateTransform(); GrowableDataBuffer buf = getBuffer(); @@ -1131,7 +1132,7 @@ GrowableDataBuffer buf = getBuffer(); curState.blendop = op; buf.putByte(NGCanvas.COMP_MODE); - buf.putObject(Blend.impl_getToolkitMode(op)); + buf.putObject(EffectHelper.getToolkitBlendMode(op)); } } @@ -1482,7 +1483,7 @@ curState.font = f; GrowableDataBuffer buf = getBuffer(); buf.putByte(NGCanvas.FONT); - buf.putObject(f.impl_getNativeFont()); + buf.putObject(FontHelper.getNativeFont(f)); } } --- old/modules/graphics/src/main/java/javafx/scene/effect/Blend.java 2016-04-29 10:54:57.983964600 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/effect/Blend.java 2016-04-29 10:54:57.599236500 -0700 @@ -128,11 +128,8 @@ /** * Used by Group to convert the FX BlendMode enum value into a Decora value. - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version */ - @Deprecated - public static Mode impl_getToolkitMode(BlendMode mode) { + static Mode getToolkitMode(BlendMode mode) { return toPGMode(mode); } --- old/modules/graphics/src/main/java/javafx/scene/effect/Effect.java 2016-04-29 10:55:00.165408200 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/effect/Effect.java 2016-04-29 10:54:59.802751700 -0700 @@ -95,6 +95,11 @@ public Effect copy(Effect effect) { return effect.copy(); } + + @Override + public com.sun.scenario.effect.Blend.Mode getToolkitBlendMode(BlendMode mode) { + return Blend.getToolkitMode(mode); + } }); } --- old/modules/graphics/src/main/java/javafx/scene/effect/ImageInput.java 2016-04-29 10:55:02.188622900 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/effect/ImageInput.java 2016-04-29 10:55:01.850032200 -0700 @@ -242,7 +242,7 @@ com.sun.scenario.effect.Identity peer = (com.sun.scenario.effect.Identity) getPeer(); Image localSource = getSource(); - if (localSource != null && localSource.impl_getPlatformImage() != null) { + if (localSource != null && Toolkit.getImageAccessor().getPlatformImage(localSource) != null) { peer.setSource(Toolkit.getToolkit().toFilterable(localSource)); } else { peer.setSource(null); @@ -261,7 +261,7 @@ Node node, BoundsAccessor boundsAccessor) { Image localSource = getSource(); - if (localSource != null && localSource.impl_getPlatformImage() != null) { + if (localSource != null && Toolkit.getImageAccessor().getPlatformImage(localSource) != null) { float localX = (float) getX(); float localY = (float) getY(); float localWidth = (float) localSource.getWidth(); --- old/modules/graphics/src/main/java/javafx/scene/image/Image.java 2016-04-29 10:55:04.232946400 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/image/Image.java 2016-04-29 10:55:03.885467200 -0700 @@ -143,6 +143,16 @@ public int[] getNonPreColors(PixelFormat pf) { return ((PixelFormat.IndexedPixelFormat) pf).getNonPreColors(); } + + @Override + public Object getPlatformImage(Image image) { + return image.getPlatformImage(); + } + + @Override + public Image fromPlatformImage(Object image) { + return Image.fromPlatformImage(image); + } }); } @@ -527,14 +537,7 @@ */ private ObjectPropertyImpl platformImage; - /** - * @treatAsPrivate implementation detail - */ - // SB-dependency: RT-21219 has been filed to track this - // TODO: need to ensure that both SceneBuilder and JDevloper have migrated - // to new 2.2 public API before we remove this. - @Deprecated - public final Object impl_getPlatformImage() { + private final Object getPlatformImage() { return platformImage == null ? null : platformImage.get(); } @@ -949,28 +952,20 @@ } // Used by SwingUtils.toFXImage - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - // SB-dependency: RT-21217 has been filed to track this - // TODO: need to ensure that both SceneBuilder and JDevloper have migrated - // to new 2.2 public API before we remove this. - @Deprecated - public static Image impl_fromPlatformImage(Object image) { + static Image fromPlatformImage(Object image) { return new Image(image); } private void setPlatformImageWH(final PlatformImage newPlatformImage, final double newWidth, final double newHeight) { - if ((impl_getPlatformImage() == newPlatformImage) + if ((Toolkit.getImageAccessor().getPlatformImage(this) == newPlatformImage) && (getWidth() == newWidth) && (getHeight() == newHeight)) { return; } - final Object oldPlatformImage = impl_getPlatformImage(); + final Object oldPlatformImage = Toolkit.getImageAccessor().getPlatformImage(this); final double oldWidth = getWidth(); final double oldHeight = getHeight(); --- old/modules/graphics/src/main/java/javafx/scene/image/ImageView.java 2016-04-29 10:55:06.405288000 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/image/ImageView.java 2016-04-29 10:55:06.051113200 -0700 @@ -772,7 +772,8 @@ return false; } // Do alpha test on the picked pixel. - return Toolkit.getToolkit().imageContains(localImage.impl_getPlatformImage(), (float)dx, (float)dy); + return Toolkit.getToolkit().imageContains( + Toolkit.getImageAccessor().getPlatformImage(localImage), (float)dx, (float)dy); } /*************************************************************************** @@ -836,7 +837,7 @@ void updateViewport() { recomputeWidthHeight(); - if (getImage() == null || getImage().impl_getPlatformImage() == null) { + if (getImage() == null || Toolkit.getImageAccessor().getPlatformImage(getImage()) == null) { return; } @@ -868,7 +869,8 @@ peer.setSmooth(isSmooth()); } if (impl_isDirty(DirtyBits.NODE_CONTENTS)) { - peer.setImage(getImage()!= null? getImage().impl_getPlatformImage():null); + peer.setImage(getImage() != null + ? Toolkit.getImageAccessor().getPlatformImage(getImage()) : null); } // The NG part expects this to be called when image changes if (impl_isDirty(DirtyBits.NODE_VIEWPORT) || impl_isDirty(DirtyBits.NODE_CONTENTS)) { --- old/modules/graphics/src/main/java/javafx/scene/input/Clipboard.java 2016-04-29 10:55:08.522849100 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/input/Clipboard.java 2016-04-29 10:55:08.138595000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package javafx.scene.input; +import com.sun.javafx.scene.input.ClipboardHelper; import java.io.File; import java.security.AccessControlContext; import java.security.AccessController; @@ -120,6 +121,18 @@ */ public class Clipboard { + static { + // This is used by classes in different packages to get access to + // private and package private methods. + ClipboardHelper.setClipboardAccessor(new ClipboardHelper.ClipboardAccessor() { + + @Override + public boolean contentPut(Clipboard clipboard) { + return clipboard.contentPut(); + } + }); + } + /** * Whether user has put something on this clipboard. Needed for DnD. */ @@ -396,12 +409,7 @@ return (List) getContent(DataFormat.FILES); } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - public boolean impl_contentPut() { + private boolean contentPut() { return contentPut; } --- old/modules/graphics/src/main/java/javafx/scene/input/Dragboard.java 2016-04-29 10:55:10.674151200 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/input/Dragboard.java 2016-04-29 10:55:10.309742300 -0700 @@ -70,21 +70,11 @@ return peer.getTransferModes(); } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - public TKClipboard impl_getPeer() { + private TKClipboard getPeer() { return peer; } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - public static Dragboard impl_createDragboard(TKClipboard peer) { + private static Dragboard createDragboard(TKClipboard peer) { return new Dragboard(peer); } @@ -181,8 +171,22 @@ static { // This is used by classes in different packages to get access to // private and package private methods. - DragboardHelper.setDragboardAccessor((dragboard, restricted) -> { - dragboard.dataAccessRestricted = restricted; + DragboardHelper.setDragboardAccessor(new DragboardHelper.DragboardAccessor() { + + @Override + public void setDataAccessRestriction(Dragboard dragboard, boolean restricted) { + dragboard.dataAccessRestricted = restricted; + } + + @Override + public TKClipboard getPeer(Dragboard dragboard) { + return dragboard.getPeer(); + } + + @Override + public Dragboard createDragboard(TKClipboard peer) { + return Dragboard.createDragboard(peer); + } }); } } --- old/modules/graphics/src/main/java/javafx/scene/input/TouchPoint.java 2016-04-29 10:55:12.714449700 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/input/TouchPoint.java 2016-04-29 10:55:12.344876000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ package javafx.scene.input; import com.sun.javafx.scene.input.InputEventUtils; +import com.sun.javafx.scene.input.TouchPointHelper; import java.io.IOException; import java.io.Serializable; import javafx.beans.NamedArg; @@ -55,6 +56,18 @@ */ public final class TouchPoint implements Serializable{ + static { + // This is used by classes in different packages to get access to + // private and package private methods. + TouchPointHelper.setTouchPointAccessor(new TouchPointHelper.TouchPointAccessor() { + + @Override + public void reset(TouchPoint touchPoint) { + touchPoint.reset(); + } + }); + } + private transient EventTarget target; private transient Object source; @@ -135,12 +148,7 @@ return target == this.target; } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - public void impl_reset() { + private void reset() { final Point3D p = InputEventUtils.recomputeCoordinates(pickResult, null); x = p.getX(); y = p.getY(); --- old/modules/graphics/src/main/java/javafx/scene/layout/ConstraintsBase.java 2016-04-29 10:55:14.763927700 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/layout/ConstraintsBase.java 2016-04-29 10:55:14.416559300 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,6 @@ import java.util.Iterator; -import javafx.scene.Node; import javafx.scene.Parent; import com.sun.javafx.util.WeakReferenceQueue; @@ -48,24 +47,24 @@ */ public static final double CONSTRAIN_TO_PREF = Double.NEGATIVE_INFINITY; - WeakReferenceQueue impl_nodes = new WeakReferenceQueue(); + private WeakReferenceQueue nodes = new WeakReferenceQueue(); - ConstraintsBase() { - } + ConstraintsBase() { + } - void add(Parent node) { - impl_nodes.add(node); - } + void add(Parent node) { + nodes.add(node); + } void remove(Parent node) { - impl_nodes.remove(node); + nodes.remove(node); } - /** - * Calls requestLayout on layout parent associated with this constraint object. - */ - protected void requestLayout() { - Iterator nodeIter = impl_nodes.iterator(); + /** + * Calls requestLayout on layout parent associated with this constraint object. + */ + protected void requestLayout() { + Iterator nodeIter = nodes.iterator(); while (nodeIter.hasNext()) { nodeIter.next().requestLayout(); --- old/modules/graphics/src/main/java/javafx/scene/paint/Material.java 2016-04-29 10:55:16.835194200 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/paint/Material.java 2016-04-29 10:55:16.449370500 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package javafx.scene.paint; +import com.sun.javafx.scene.paint.MaterialHelper; import com.sun.javafx.sg.prism.NGPhongMaterial; import javafx.application.ConditionalFeature; import javafx.application.Platform; @@ -42,6 +43,29 @@ * @since JavaFX 8.0 */ public abstract class Material { + + static { + // This is used by classes in different packages to get access to + // private and package private methods. + MaterialHelper.setMaterialAccessor(new MaterialHelper.MaterialAccessor() { + + @Override + public BooleanProperty dirtyProperty(Material material) { + return material.dirtyProperty(); + } + + @Override + public void updatePG(Material material) { + material.updatePG(); + } + @Override + public NGPhongMaterial getNGMaterial(Material material) { + return material.getNGMaterial(); + } + + }); + } + /* * Material (including Shaders and Textures) Material is not Paint @@ -72,26 +96,11 @@ dirty.setValue(value); } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - public final BooleanProperty impl_dirtyProperty() { + private final BooleanProperty dirtyProperty() { return dirty; } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - abstract public void impl_updatePG(); + abstract void updatePG(); - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - abstract public NGPhongMaterial impl_getNGMaterial(); + abstract NGPhongMaterial getNGMaterial(); } --- old/modules/graphics/src/main/java/javafx/scene/paint/PhongMaterial.java 2016-04-29 10:55:18.879560700 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/paint/PhongMaterial.java 2016-04-29 10:55:18.531811000 -0700 @@ -26,6 +26,7 @@ package javafx.scene.paint; import com.sun.javafx.beans.event.AbstractNotifyListener; +import com.sun.javafx.scene.paint.MaterialHelper; import com.sun.javafx.sg.prism.NGPhongMaterial; import com.sun.javafx.tk.Toolkit; import javafx.beans.Observable; @@ -444,31 +445,21 @@ /** The peer node created by the graphics Toolkit/Pipeline implementation */ private NGPhongMaterial peer; - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated @Override - public NGPhongMaterial impl_getNGMaterial() { + NGPhongMaterial getNGMaterial() { if (peer == null) { peer = new NGPhongMaterial(); } return peer; } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated @Override - public void impl_updatePG(){ + void updatePG(){ if (!isDirty()) { return; } - final NGPhongMaterial pMaterial = impl_getNGMaterial(); + final NGPhongMaterial pMaterial = MaterialHelper.getNGMaterial(this); if (diffuseColorDirty) { pMaterial.setDiffuseColor(getDiffuseColor() == null ? null : Toolkit.getPaintAccessor().getPlatformPaint(getDiffuseColor())); @@ -482,19 +473,19 @@ } if (diffuseMapDirty) { pMaterial.setDiffuseMap(getDiffuseMap() - == null ? null : getDiffuseMap().impl_getPlatformImage()); + == null ? null : Toolkit.getImageAccessor().getPlatformImage(getDiffuseMap())); } if (specularMapDirty) { pMaterial.setSpecularMap(getSpecularMap() - == null ? null : getSpecularMap().impl_getPlatformImage()); + == null ? null : Toolkit.getImageAccessor().getPlatformImage(getSpecularMap())); } if (bumpMapDirty) { pMaterial.setBumpMap(getBumpMap() - == null ? null : getBumpMap().impl_getPlatformImage()); + == null ? null : Toolkit.getImageAccessor().getPlatformImage(getBumpMap())); } if (selfIlluminationMapDirty) { pMaterial.setSelfIllumMap(getSelfIlluminationMap() - == null ? null : getSelfIlluminationMap().impl_getPlatformImage()); + == null ? null : Toolkit.getImageAccessor().getPlatformImage(getSelfIlluminationMap())); } setDirty(false); --- old/modules/graphics/src/main/java/javafx/scene/shape/Shape3D.java 2016-04-29 10:55:21.005661300 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/shape/Shape3D.java 2016-04-29 10:55:20.651240400 -0700 @@ -31,6 +31,7 @@ import com.sun.javafx.jmx.MXNodeAlgorithm; import com.sun.javafx.jmx.MXNodeAlgorithmContext; import com.sun.javafx.scene.DirtyBits; +import com.sun.javafx.scene.paint.MaterialHelper; import com.sun.javafx.sg.prism.NGShape3D; import javafx.application.ConditionalFeature; import javafx.application.Platform; @@ -115,11 +116,11 @@ @Override protected void invalidated() { if (old != null) { - old.impl_dirtyProperty().removeListener(weakMaterialChangeListener); + MaterialHelper.dirtyProperty(old).removeListener(weakMaterialChangeListener); } Material newMaterial = get(); if (newMaterial != null) { - newMaterial.impl_dirtyProperty().addListener(weakMaterialChangeListener); + MaterialHelper.dirtyProperty(newMaterial).addListener(weakMaterialChangeListener); } impl_markDirty(DirtyBits.MATERIAL); impl_geomChanged(); @@ -223,8 +224,8 @@ final NGShape3D peer = impl_getPeer(); if (impl_isDirty(DirtyBits.MATERIAL)) { Material mat = getMaterial() == null ? DEFAULT_MATERIAL : getMaterial(); - mat.impl_updatePG(); // new material should be updated - peer.setMaterial(mat.impl_getNGMaterial()); + MaterialHelper.updatePG(mat); // new material should be updated + peer.setMaterial(MaterialHelper.getNGMaterial(mat)); } if (impl_isDirty(DirtyBits.NODE_DRAWMODE)) { peer.setDrawMode(getDrawMode() == null ? DrawMode.FILL : getDrawMode()); --- old/modules/graphics/src/main/java/javafx/scene/text/Font.java 2016-04-29 10:55:23.155754800 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/text/Font.java 2016-04-29 10:55:22.803143700 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package javafx.scene.text; +import com.sun.javafx.text.FontHelper; import java.io.FilePermission; import java.io.InputStream; import java.net.URL; @@ -57,6 +58,29 @@ */ public final class Font { + static { + // This is used by classes in different packages to get access to + // private and package private methods. + FontHelper.setFontAccessor(new FontHelper.FontAccessor() { + + @Override + public Object getNativeFont(Font font) { + return font.getNativeFont(); + } + + @Override + public void setNativeFont(Font font, Object f, String nam, String fam, String styl) { + font.setNativeFont(f, nam, fam, styl); + } + + @Override + public Font nativeFont(Object f, String name, String family, String style, double size) { + return Font.nativeFont(f, name, family, style, size); + } + + }); + } + private static final String DEFAULT_FAMILY = "System"; private static final String DEFAULT_FULLNAME = "System Regular"; @@ -315,7 +339,7 @@ // Font was created based on an existing native font. If however a Font // was created directly in FX, then we need to find the native font // to use. This call will also set the family and style by invoking - // the impl_setNativeFont callback method. + // the setNativeFont callback method. Toolkit.getToolkit().getFontLoader().loadFont(this); } @@ -501,31 +525,16 @@ private Object nativeFont; - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - public Object impl_getNativeFont() { return nativeFont; } + private Object getNativeFont() { return nativeFont; } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - public void impl_setNativeFont(Object f, String nam, String fam, String styl) { + private void setNativeFont(Object f, String nam, String fam, String styl) { nativeFont = f; name = nam; family = fam; style = styl; } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - public static Font impl_NativeFont(Object f, String name, String family, + private static Font nativeFont(Object f, String name, String family, String style, double size) { Font retFont = new Font( f, family, name, style, size); return retFont; --- old/modules/graphics/src/main/java/javafx/scene/text/Text.java 2016-04-29 10:55:25.253873300 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/text/Text.java 2016-04-29 10:55:24.899393800 -0700 @@ -42,6 +42,7 @@ import com.sun.javafx.sg.prism.NGNode; import com.sun.javafx.sg.prism.NGShape; import com.sun.javafx.sg.prism.NGText; +import com.sun.javafx.text.FontHelper; import com.sun.javafx.tk.Toolkit; import javafx.beans.DefaultProperty; import javafx.beans.InvalidationListener; @@ -490,7 +491,7 @@ private Object getFontInternal() { Font font = getFont(); if (font == null) font = Font.getDefault(); - return font.impl_getNativeFont(); + return FontHelper.getNativeFont(font); } public final ObjectProperty fontProperty() { --- old/modules/graphics/src/main/java/javafx/stage/Stage.java 2016-04-29 10:55:27.495898700 -0700 +++ new/modules/graphics/src/main/java/javafx/stage/Stage.java 2016-04-29 10:55:27.132492500 -0700 @@ -693,7 +693,7 @@ @Override protected void onChanged(Change c) { List platformImages = new ArrayList(); for (Image icon : icons) { - platformImages.add(icon.impl_getPlatformImage()); + platformImages.add(Toolkit.getImageAccessor().getPlatformImage(icon)); } if (impl_peer != null) { impl_peer.setIcons(platformImages); @@ -1186,7 +1186,7 @@ List platformImages = new ArrayList(); for (Image icon : icons) { - platformImages.add(icon.impl_getPlatformImage()); + platformImages.add(Toolkit.getImageAccessor().getPlatformImage(icon)); } if (impl_peer != null) { impl_peer.setIcons(platformImages); --- old/modules/graphics/src/test/java/javafx/animation/AnimationShim.java 2016-04-29 10:55:29.606719500 -0700 +++ new/modules/graphics/src/test/java/javafx/animation/AnimationShim.java 2016-04-29 10:55:29.252768500 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -49,43 +49,43 @@ } @Override - public void impl_pause() { - super.impl_pause(); + public void doPause() { + super.doPause(); } @Override - public void impl_start(boolean forceSync) { - super.impl_start(forceSync); + public void doStart(boolean forceSync) { + super.doStart(forceSync); } @Override - public void impl_setCurrentRate(double currentRate) { - super.impl_setCurrentRate(currentRate); + public void setCurrentRate(double currentRate) { + super.setCurrentRate(currentRate); } @Override - public void impl_setCurrentTicks(long ticks) { - super.impl_setCurrentTicks(ticks); + public void setCurrentTicks(long ticks) { + super.setCurrentTicks(ticks); } @Override - public boolean impl_startable(boolean forceSync) { - return super.impl_startable(forceSync); + public boolean startable(boolean forceSync) { + return super.startable(forceSync); } @Override - public void impl_stop() { - super.impl_stop(); + public void doStop() { + super.doStop(); } @Override - public void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + public void sync(boolean forceSync) { + super.sync(forceSync); } @Override - public void impl_timePulse(long elapsedTime) { - super.impl_timePulse(elapsedTime); + public void doTimePulse(long elapsedTime) { + super.doTimePulse(elapsedTime); } @Override @@ -111,28 +111,28 @@ return pulseReceiver; } - public void shim_impl_finished() { - impl_finished(); + public void shim_finished() { + finished(); } @Override - abstract public void impl_playTo(long currentTicks, long cycleTicks); + abstract public void doPlayTo(long currentTicks, long cycleTicks); @Override - abstract public void impl_jumpTo(long currentTicks, long cycleTicks, boolean forceJump); + abstract public void doJumpTo(long currentTicks, long cycleTicks, boolean forceJump); //------------------------------- - public static void impl_finished(Animation a) { - a.impl_finished(); + public static void finished(Animation a) { + a.finished(); } - public static void impl_start(Animation a, boolean forceSync) { - a.impl_start(forceSync); + public static void doStart(Animation a, boolean forceSync) { + a.doStart(forceSync); } - public static boolean impl_startable(Animation a, boolean forceSync) { - return a.impl_startable(forceSync); + public static boolean startable(Animation a, boolean forceSync) { + return a.startable(forceSync); } } --- old/modules/graphics/src/test/java/javafx/animation/TransitionShim.java 2016-04-29 10:55:31.655935200 -0700 +++ new/modules/graphics/src/test/java/javafx/animation/TransitionShim.java 2016-04-29 10:55:31.307982500 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,22 +43,22 @@ } @Override - public void impl_pause() { - super.impl_pause(); + public void doPause() { + super.doPause(); } @Override - public void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + public void sync(boolean forceSync) { + super.sync(forceSync); } @Override - public void impl_jumpTo(long currentTicks, long cycleTicks, boolean forceJump) { - super.impl_jumpTo(currentTicks, cycleTicks, forceJump); + public void doJumpTo(long currentTicks, long cycleTicks, boolean forceJump) { + super.doJumpTo(currentTicks, cycleTicks, forceJump); } public void shim_impl_finished() { - super.impl_finished(); + super.finished(); } @Override @@ -67,18 +67,18 @@ } @Override - public void impl_start(boolean forceSync) { - super.impl_start(forceSync); + public void doStart(boolean forceSync) { + super.doStart(forceSync); } @Override - public boolean impl_startable(boolean forceSync) { - return super.impl_startable(forceSync); + public boolean startable(boolean forceSync) { + return super.startable(forceSync); } @Override - public void impl_playTo(long currentTicks, long cycleTicks) { - super.impl_playTo(currentTicks, cycleTicks); + public void doPlayTo(long currentTicks, long cycleTicks) { + super.doPlayTo(currentTicks, cycleTicks); } @Override --- old/modules/graphics/src/test/java/test/com/sun/javafx/pgstub/StubFontLoader.java 2016-04-29 10:55:33.796038900 -0700 +++ new/modules/graphics/src/test/java/test/com/sun/javafx/pgstub/StubFontLoader.java 2016-04-29 10:55:33.441786500 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import com.sun.javafx.font.FontStrike; import com.sun.javafx.font.PGFont; import com.sun.javafx.geom.transform.BaseTransform; +import com.sun.javafx.text.FontHelper; import com.sun.javafx.tk.FontLoader; import com.sun.javafx.tk.FontMetrics; import javafx.scene.text.Font; @@ -48,34 +49,34 @@ nativeFont.font = font; String name = font.getName().trim().toLowerCase(Locale.ROOT); if (name.equals("system") || name.equals("system regular")) { - font.impl_setNativeFont(nativeFont, font.getName(), "System", "Regular"); + FontHelper.setNativeFont(font, nativeFont, font.getName(), "System", "Regular"); } else if (name.equals("amble regular")) { - font.impl_setNativeFont(nativeFont, font.getName(), "Amble", "Regular"); + FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble", "Regular"); } else if (name.equals("amble bold")) { - font.impl_setNativeFont(nativeFont, font.getName(), "Amble", "Bold"); + FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble", "Bold"); } else if (name.equals("amble italic")) { - font.impl_setNativeFont(nativeFont, font.getName(), "Amble", "Italic"); + FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble", "Italic"); } else if (name.equals("amble bold italic")) { - font.impl_setNativeFont(nativeFont, font.getName(), "Amble", + FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble", "Bold Italic"); } else if (name.equals("amble condensed")) { - font.impl_setNativeFont(nativeFont, font.getName(), "Amble Cn", "Regular"); + FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble Cn", "Regular"); } else if (name.equals("amble bold condensed")) { - font.impl_setNativeFont(nativeFont, font.getName(), "Amble Cn", "Bold"); + FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble Cn", "Bold"); } else if (name.equals("amble condensed italic")) { - font.impl_setNativeFont(nativeFont, font.getName(), "Amble Cn", "Italic"); + FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble Cn", "Italic"); } else if (name.equals("amble bold condensed italic")) { - font.impl_setNativeFont(nativeFont, font.getName(), "Amble Cn", + FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble Cn", "Bold Italic"); } else if (name.equals("amble light")) { - font.impl_setNativeFont(nativeFont, font.getName(), "Amble Lt", "Regular"); + FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble Lt", "Regular"); } else if (name.equals("amble light italic")) { - font.impl_setNativeFont(nativeFont, font.getName(), "Amble Lt", "Italic"); + FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble Lt", "Italic"); } else if (name.equals("amble light condensed")) { - font.impl_setNativeFont(nativeFont, font.getName(), "Amble LtCn", + FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble LtCn", "Regular"); } else if (name.equals("amble light condensed italic")) { - font.impl_setNativeFont(nativeFont, font.getName(), "Amble LtCn", + FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble LtCn", "Italic"); } } --- old/modules/graphics/src/test/java/test/com/sun/javafx/pgstub/StubToolkit.java 2016-04-29 10:55:35.899463000 -0700 +++ new/modules/graphics/src/test/java/test/com/sun/javafx/pgstub/StubToolkit.java 2016-04-29 10:55:35.529517300 -0700 @@ -636,7 +636,8 @@ @Override public Filterable toFilterable(Image img) { - return StubFilterable.create((StubPlatformImage)img.impl_getPlatformImage()); + return StubFilterable.create((StubPlatformImage) + Toolkit.getImageAccessor().getPlatformImage(img)); } @Override --- old/modules/graphics/src/test/java/test/com/sun/javafx/text/TextLayoutTest.java 2016-04-29 10:55:38.178153300 -0700 +++ new/modules/graphics/src/test/java/test/com/sun/javafx/text/TextLayoutTest.java 2016-04-29 10:55:37.823918900 -0700 @@ -32,6 +32,7 @@ import com.sun.javafx.scene.text.GlyphList; import com.sun.javafx.scene.text.TextSpan; import com.sun.javafx.scene.text.TextLine; +import com.sun.javafx.text.FontHelper; import com.sun.javafx.text.PrismTextLayout; import com.sun.javafx.text.PrismTextLayout; @@ -100,8 +101,8 @@ @Test public void buildRuns() { PrismTextLayout layout = new PrismTextLayout(); - PGFont font = (PGFont)Font.font("Monaco", 12).impl_getNativeFont(); - PGFont font2 = (PGFont)Font.font("Tahoma", 12).impl_getNativeFont(); + PGFont font = (PGFont) FontHelper.getNativeFont(Font.font("Monaco", 12)); + PGFont font2 = (PGFont) FontHelper.getNativeFont(Font.font("Tahoma", 12)); /* simple case */ layout.setContent("hello", font); --- old/modules/graphics/src/test/java/test/javafx/animation/AnimationDummy.java 2016-04-29 10:55:40.269357400 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/AnimationDummy.java 2016-04-29 10:55:39.864244800 -0700 @@ -34,13 +34,13 @@ } @Override - public void impl_playTo(long currentTicks, long cycleTicks) { + public void doPlayTo(long currentTicks, long cycleTicks) { // TODO Auto-generated method stub } @Override - public void impl_jumpTo(long currentTicks, long cycleTicks, boolean forceJump) { + public void doJumpTo(long currentTicks, long cycleTicks, boolean forceJump) { // TODO Auto-generated method stub } --- old/modules/graphics/src/test/java/test/javafx/animation/AnimationImpl.java 2016-04-29 10:55:42.296831500 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/AnimationImpl.java 2016-04-29 10:55:41.948954100 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,12 +44,12 @@ } @Override - public void impl_playTo(long currentTicks, long cycleTicks) { + public void doPlayTo(long currentTicks, long cycleTicks) { } @Override - public void impl_jumpTo(long currentTicks, long cycleTicks, boolean forceJump) { - impl_setCurrentTicks(currentTicks); + public void doJumpTo(long currentTicks, long cycleTicks, boolean forceJump) { + setCurrentTicks(currentTicks); } } --- old/modules/graphics/src/test/java/test/javafx/animation/AnimationMock.java 2016-04-29 10:55:44.352264600 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/AnimationMock.java 2016-04-29 10:55:43.997783000 -0700 @@ -89,22 +89,22 @@ @Override - public void impl_playTo(long currentTicks, long cycleTicks) { + public void doPlayTo(long currentTicks, long cycleTicks) { lastCommand = Command.PLAY; lastCurrentTicks = currentTicks; lastCycleTicks = cycleTicks; } @Override - public void impl_jumpTo(long currentTicks, long cycleTicks, boolean forceJump) { + public void doJumpTo(long currentTicks, long cycleTicks, boolean forceJump) { lastCommand = Command.JUMP; lastCurrentTicks = currentTicks; lastCycleTicks = cycleTicks; } @Override - public void impl_timePulse(long elapsedTime) { - super.impl_timePulse(elapsedTime); + public void doTimePulse(long elapsedTime) { + super.doTimePulse(elapsedTime); lastTimePulse = elapsedTime; } --- old/modules/graphics/src/test/java/test/javafx/animation/AnimationPulseReceiverTest.java 2016-04-29 10:55:46.385662300 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/AnimationPulseReceiverTest.java 2016-04-29 10:55:46.049457700 -0700 @@ -53,7 +53,7 @@ @After public void tearDown() { - animation.impl_stop(); + animation.doStop(); } @Test @@ -72,11 +72,11 @@ assertEquals(13 * DEFAULT_RESOLUTION, animation.getLastTimePulse()); // stop animation - animation.impl_stop(); + animation.doStop(); assertFalse(timer.containsPulseReceiver(animation.shim_pulseReceiver())); // stop again - animation.impl_stop(); + animation.doStop(); assertFalse(timer.containsPulseReceiver(animation.shim_pulseReceiver())); // start again --- old/modules/graphics/src/test/java/test/javafx/animation/AnimationSetRateTest.java 2016-04-29 10:55:48.415952300 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/AnimationSetRateTest.java 2016-04-29 10:55:48.077961200 -0700 @@ -78,7 +78,7 @@ assertAnimation(1.5, 1.5, Status.RUNNING, true); // changing the rate of a animation playing in reverse - animation.impl_setCurrentRate(-1.5); + animation.setCurrentRate(-1.5); animation.setRate(2.2); assertAnimation(2.2, -2.2, Status.RUNNING, true); @@ -202,7 +202,7 @@ assertAnimation(1.5, 1.5, Status.RUNNING, true); // changing the rate of a animation playing in reverse - animation.impl_setCurrentRate(-1.5); + animation.setCurrentRate(-1.5); animation.setRate(0.0); assertAnimation(0.0, 0.0, Status.RUNNING, false); animation.setRate(2.2); @@ -259,7 +259,7 @@ assertAnimation(1.5, 1.5, Status.RUNNING, true); // changing the rate of a paused animation pointing in reverse - animation.impl_setCurrentRate(-1.5); + animation.setCurrentRate(-1.5); animation.pause(); animation.setRate(2.2); assertAnimation(2.2, 0.0, Status.PAUSED, false); @@ -335,7 +335,7 @@ assertAnimation(1.5, 1.5, Status.RUNNING, true); // changing the rate of a paused animation pointing in reverse - animation.impl_setCurrentRate(-1.5); + animation.setCurrentRate(-1.5); animation.pause(); animation.setRate(0.0); assertAnimation(0.0, 0.0, Status.PAUSED, false); --- old/modules/graphics/src/test/java/test/javafx/animation/AnimationTest.java 2016-04-29 10:55:50.534326300 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/AnimationTest.java 2016-04-29 10:55:50.195735800 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -236,7 +236,7 @@ assertTrue(animation.getCycleDuration().greaterThan(Duration.ZERO)); // should not be startable - assertFalse(animation.impl_startable(true)); + assertFalse(animation.startable(true)); // jump animation.jumpTo(Duration.ZERO); @@ -411,34 +411,34 @@ @Test public void testStart() { // cycleDuration = 1000ms - assertTrue(animation.impl_startable(true)); - animation.impl_start(true); + assertTrue(animation.startable(true)); + animation.doStart(true); assertEquals(Status.RUNNING, animation.getStatus()); assertEquals(1.0, animation.getCurrentRate(), EPSILON); assertEquals(6000, clipEnvelope.getTimelineTicks()); assertEquals(1.0, clipEnvelope.getRate(), EPSILON); assertEquals(false, clipEnvelope.getAutoReverse()); assertEquals(1, clipEnvelope.getCycleCount()); - animation.shim_impl_finished(); + animation.shim_finished(); // change all values and try again animation.shim_setCycleDuration(TWO_SECS); animation.setRate(-2.0); animation.setAutoReverse(true); animation.setCycleCount(Animation.INDEFINITE); - assertTrue(animation.impl_startable(true)); - animation.impl_start(true); + assertTrue(animation.startable(true)); + animation.doStart(true); assertEquals(Status.RUNNING, animation.getStatus()); assertEquals(-2.0, animation.getCurrentRate(), EPSILON); assertEquals(12000, clipEnvelope.getTimelineTicks()); assertEquals(-2.0, clipEnvelope.getRate(), EPSILON); assertEquals(true, clipEnvelope.getAutoReverse()); assertEquals(Animation.INDEFINITE, clipEnvelope.getCycleCount()); - animation.shim_impl_finished(); + animation.shim_finished(); // cycleDuration = 0 animation.shim_setCycleDuration(Duration.ZERO); - assertFalse(animation.impl_startable(true)); + assertFalse(animation.startable(true)); } @Test @@ -447,9 +447,9 @@ animation.play(); assertEquals(Status.RUNNING, animation.getStatus()); assertEquals(Duration.ZERO, animation.getCurrentTime()); - animation.impl_setCurrentTicks(12000); + animation.setCurrentTicks(12000); assertEquals(TWO_SECS, animation.getCurrentTime()); - animation.shim_impl_finished(); + animation.shim_finished(); animation.shim_setCycleDuration(ONE_SEC); animation.play(); @@ -463,14 +463,14 @@ animation.setOnFinished(listener); // stopped timeline - animation.shim_impl_finished(); + animation.shim_finished(); assertEquals(Status.STOPPED, animation.getStatus()); assertEquals(0.0, animation.getCurrentRate(), EPSILON); assertTrue(listener.wasCalled); // playing timeline animation.play(); - animation.shim_impl_finished(); + animation.shim_finished(); assertEquals(Status.STOPPED, animation.getStatus()); assertEquals(0.0, animation.getCurrentRate(), EPSILON); assertTrue(listener.wasCalled); @@ -478,7 +478,7 @@ // paused timeline animation.play(); animation.pause(); - animation.shim_impl_finished(); + animation.shim_finished(); assertEquals(Status.STOPPED, animation.getStatus()); assertEquals(0.0, animation.getCurrentRate(), EPSILON); assertTrue(listener.wasCalled); @@ -501,7 +501,7 @@ } catch (SecurityException ex) { // ignore } - animation.shim_impl_finished(); + animation.shim_finished(); try { System.setErr(defaultErrorStream); } catch (SecurityException ex) { @@ -518,7 +518,7 @@ } catch (SecurityException ex) { // ignore } - animation.shim_impl_finished(); + animation.shim_finished(); try { System.setErr(defaultErrorStream); } catch (SecurityException ex) { @@ -536,7 +536,7 @@ } catch (SecurityException ex) { // ignore } - animation.shim_impl_finished(); + animation.shim_finished(); try { System.setErr(defaultErrorStream); } catch (SecurityException ex) { @@ -552,19 +552,19 @@ final int resolution = Toolkit.getToolkit().getMasterTimer().getDefaultResolution(); // send pulse - animation.impl_timePulse(4 * resolution); + animation.doTimePulse(4 * resolution); assertEquals(4 * resolution, clipEnvelope.getLastTimePulse()); // send half pulse - animation.impl_timePulse(Math.round(4.5 * resolution)); + animation.doTimePulse(Math.round(4.5 * resolution)); assertEquals(Math.round(4.5 * resolution), clipEnvelope.getLastTimePulse()); // send full pulse - animation.impl_timePulse(Math.round(5.5 * resolution)); + animation.doTimePulse(Math.round(5.5 * resolution)); assertEquals(Math.round(5.5 * resolution), clipEnvelope.getLastTimePulse()); // send half pulse - animation.impl_timePulse(6 * resolution); + animation.doTimePulse(6 * resolution); assertEquals(6 * resolution, clipEnvelope.getLastTimePulse()); } @@ -575,19 +575,19 @@ animation = new AnimationImpl(timer, clipEnvelope, resolution); // send pulse - animation.impl_timePulse(4 * resolution); + animation.doTimePulse(4 * resolution); assertEquals(4 * resolution, clipEnvelope.getLastTimePulse()); // send half pulse - animation.impl_timePulse(Math.round(4.5 * resolution)); + animation.doTimePulse(Math.round(4.5 * resolution)); assertEquals(0, clipEnvelope.getLastTimePulse()); // send full pulse - animation.impl_timePulse(Math.round(5.5 * resolution)); + animation.doTimePulse(Math.round(5.5 * resolution)); assertEquals(Math.round(5.5 * resolution), clipEnvelope.getLastTimePulse()); // send half pulse, this time it should trigger a pulse - animation.impl_timePulse(6 * resolution); + animation.doTimePulse(6 * resolution); assertEquals(6 * resolution, clipEnvelope.getLastTimePulse()); } --- old/modules/graphics/src/test/java/test/javafx/animation/FadeTransitionTest.java 2016-04-29 10:55:52.609110800 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/FadeTransitionTest.java 2016-04-29 10:55:52.257385500 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -130,15 +130,15 @@ t0.setFromValue(0.5); t0.setToValue(1.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(0.5, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,0.4); assertEquals(0.7, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(1.0, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -154,104 +154,104 @@ t0.setFromValue(Double.NaN); t0.setToValue(Double.NaN); t0.setByValue(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only from-value set node.setOpacity(originalValue); t0.setFromValue(fromValue); t0.setToValue(Double.NaN); t0.setByValue(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only to-value set node.setOpacity(originalValue); t0.setFromValue(Double.NaN); t0.setToValue(toValue); t0.setByValue(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only by-value set node.setOpacity(originalValue); t0.setFromValue(Double.NaN); t0.setToValue(Double.NaN); t0.setByValue(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue + byValue, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and to-values set node.setOpacity(originalValue); t0.setFromValue(fromValue); t0.setToValue(toValue); t0.setByValue(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and by-values set node.setOpacity(originalValue); t0.setFromValue(fromValue); t0.setToValue(Double.NaN); t0.setByValue(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue + byValue, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // to- and by-values set node.setOpacity(originalValue); t0.setFromValue(Double.NaN); t0.setToValue(toValue); t0.setByValue(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // all values set node.setOpacity(originalValue); t0.setFromValue(fromValue); t0.setToValue(toValue); t0.setByValue(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -262,54 +262,54 @@ // start < 0.0 t0.setFromValue(-0.4); t0.setToValue(0.6); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(0.0, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,0.5); assertEquals(0.3, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(0.6, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // start > 1.0 t0.setFromValue(1.3); t0.setToValue(0.3); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(1.0, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,0.5); assertEquals(0.65, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(0.3, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // end < 0.0 t0.setFromValue(0.2); t0.setToValue(-1.2); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(0.2, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,0.5); assertEquals(0.1, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(0.0, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // end > 1.0 t0.setFromValue(0.9); t0.setToValue(1.9); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(0.9, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,0.5); assertEquals(0.95, node.getOpacity(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(1.0, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -324,25 +324,25 @@ pt.setNode(node2); // node set, parent set - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); TransitionShim.interpolate(ft,0.5); assertEquals(0.75, node.getOpacity(), EPSILON); assertEquals(1.0, node2.getOpacity(), EPSILON); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); // node null, parent set ft.setNode(null); - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); TransitionShim.interpolate(ft,0.4); assertEquals(0.75, node.getOpacity(), EPSILON); assertEquals(0.7, node2.getOpacity(), EPSILON); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); // node null, parent null pt.setNode(null); - assertFalse(AnimationShim.impl_startable(ft,true)); + assertFalse(AnimationShim.startable(ft,true)); } @Test @@ -353,64 +353,64 @@ ft.setToValue(1.0); // start - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); ft.setFromValue(0.0); TransitionShim.interpolate(ft,0.5); assertEquals(0.75, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); ft.setFromValue(0.5); // end - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); ft.setToValue(0.0); TransitionShim.interpolate(ft,0.2); assertEquals(0.6, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); ft.setToValue(1.0); // node - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); ft.setNode(null); TransitionShim.interpolate(ft,0.7); assertEquals(0.85, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); ft.setNode(node); // interpolator - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); ft.setInterpolator(null); TransitionShim.interpolate(ft,0.1); assertEquals(0.55, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); ft.setInterpolator(Interpolator.LINEAR); } @Test public void testStartable() { final FadeTransition t0 = new FadeTransition(Duration.ONE, node); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // duration is 0 t0.setDuration(Duration.ZERO); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setDuration(Duration.ONE); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // node is null t0.setNode(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setNode(node); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // interpolator is null t0.setInterpolator(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setInterpolator(Interpolator.LINEAR); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); } @Test @@ -419,21 +419,21 @@ // first run node.setOpacity(0.6); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); node.setOpacity(0.8); TransitionShim.interpolate(t0,0.0); assertEquals(0.6, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // second run node.setOpacity(0.2); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); node.setOpacity(0.8); TransitionShim.interpolate(t0,0.0); assertEquals(0.2, node.getOpacity(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } } --- old/modules/graphics/src/test/java/test/javafx/animation/FillTransitionTest.java 2016-04-29 10:55:54.685259000 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/FillTransitionTest.java 2016-04-29 10:55:54.346770700 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -126,15 +126,15 @@ final Color toValue = Color.color(0.8, 0.4, 0.2, 0.9); final FillTransition t0 = new FillTransition(ONE_SEC, shape, fromValue, toValue); - assertTrue(AnimationShim.impl_startable(t0,false)); - AnimationShim.impl_start(t0,false); + assertTrue(AnimationShim.startable(t0,false)); + AnimationShim.doStart(t0,false); TransitionShim.interpolate(t0,0.0); assertColorEquals(Color.color(0.2, 0.3, 0.7, 0.1), shape.getFill()); TransitionShim.interpolate(t0,0.4); assertColorEquals(Color.color(0.44, 0.34, 0.5, 0.42), shape.getFill()); TransitionShim.interpolate(t0,1.0); assertColorEquals(Color.color(0.8, 0.4, 0.2, 0.9), shape.getFill()); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -148,20 +148,20 @@ // no from value set shape.setFill(originalValue); t0.setFromValue(null); - assertTrue(AnimationShim.impl_startable(t0,false)); - AnimationShim.impl_start(t0,false); + assertTrue(AnimationShim.startable(t0,false)); + AnimationShim.doStart(t0,false); TransitionShim.interpolate(t0,0.0); assertColorEquals(originalValue, shape.getFill()); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from-value set shape.setFill(originalValue); t0.setFromValue(fromValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertColorEquals(fromValue, shape.getFill()); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -178,29 +178,29 @@ shape2.setFill(Color.WHITE); // node set, parent set - assertTrue(AnimationShim.impl_startable(ft,false)); - AnimationShim.impl_start(ft,false); + assertTrue(AnimationShim.startable(ft,false)); + AnimationShim.doStart(ft,false); TransitionShim.interpolate(ft,0.5); assertColorEquals(Color.color(0.5, 0.6, 0.7, 0.7), shape.getFill()); assertColorEquals(Color.WHITE, shape2.getFill()); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); // node null, parent set ft.setShape(null); - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); TransitionShim.interpolate(ft,0.4); assertColorEquals(Color.color(0.5, 0.6, 0.7, 0.7), shape.getFill()); assertColorEquals(Color.color(0.4, 0.56, 0.72, 0.76), shape2.getFill()); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); // node null, parent not shape set pt.setNode(new Group()); - assertFalse(AnimationShim.impl_startable(ft,true)); + assertFalse(AnimationShim.startable(ft,true)); // node null, parent null pt.setNode(null); - assertFalse(AnimationShim.impl_startable(ft,true)); + assertFalse(AnimationShim.startable(ft,true)); } @Test @@ -211,39 +211,39 @@ ft.setInterpolator(Interpolator.LINEAR); // start - assertTrue(AnimationShim.impl_startable(ft,false)); - AnimationShim.impl_start(ft,false); + assertTrue(AnimationShim.startable(ft,false)); + AnimationShim.doStart(ft,false); ft.setFromValue(Color.WHITE); TransitionShim.interpolate(ft,0.5); assertColorEquals(Color.color(0.5, 0.6, 0.7, 0.3), shape.getFill()); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); ft.setFromValue(fromValue); // end - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); ft.setToValue(Color.BLACK); TransitionShim.interpolate(ft,0.2); assertColorEquals(Color.color(0.2, 0.48, 0.76, 0.24), shape.getFill()); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); ft.setToValue(toValue); // shape - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); ft.setShape(null); TransitionShim.interpolate(ft,0.7); assertColorEquals(Color.color(0.7, 0.68, 0.66, 0.34), shape.getFill()); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); ft.setShape(shape); // interpolator - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); ft.setInterpolator(null); TransitionShim.interpolate(ft,0.1); assertColorEquals(Color.color(0.1, 0.44, 0.78, 0.22), shape.getFill()); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); ft.setInterpolator(Interpolator.LINEAR); } @@ -252,48 +252,48 @@ final FillTransition t0 = new FillTransition(Duration.ONE, shape, Color.WHITE, Color.BLACK); final Paint paint2 = new LinearGradient(0, 0, 1, 1, false, null, new Stop[] { new Stop(0, Color.RED) }); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // duration is 0 t0.setDuration(Duration.ZERO); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setDuration(Duration.ONE); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // interpolator is null t0.setInterpolator(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setInterpolator(Interpolator.LINEAR); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // shape is null t0.setShape(null); - assertFalse(AnimationShim.impl_startable(t0,false)); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,false)); + assertFalse(AnimationShim.startable(t0,true)); t0.setShape(shape); - assertTrue(AnimationShim.impl_startable(t0,false)); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,false)); + assertTrue(AnimationShim.startable(t0,true)); // fromValue t0.setFromValue(null); shape.setFill(paint2); - assertFalse(AnimationShim.impl_startable(t0,false)); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,false)); + assertFalse(AnimationShim.startable(t0,true)); shape.setFill(Color.BLACK); - assertTrue(AnimationShim.impl_startable(t0,false)); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,false)); + assertTrue(AnimationShim.startable(t0,true)); t0.setFromValue(Color.WHITE); shape.setFill(paint2); - assertTrue(AnimationShim.impl_startable(t0,false)); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,false)); + assertTrue(AnimationShim.startable(t0,true)); // toValue t0.setToValue(null); - assertFalse(AnimationShim.impl_startable(t0,false)); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,false)); + assertFalse(AnimationShim.startable(t0,true)); t0.setToValue(Color.BLACK); - assertTrue(AnimationShim.impl_startable(t0,false)); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,false)); + assertTrue(AnimationShim.startable(t0,true)); } @Test @@ -301,38 +301,38 @@ final FillTransition t0 = new FillTransition(Duration.ONE, shape, Color.WHITE, Color.BLACK); final Paint paint2 = new LinearGradient(0, 0, 1, 1, false, null, new Stop[] { new Stop(0, Color.RED) }); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); - AnimationShim.impl_finished(t0); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); + AnimationShim.finished(t0); // shape is null t0.setShape(null); - assertTrue(AnimationShim.impl_startable(t0,false)); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,false)); + assertFalse(AnimationShim.startable(t0,true)); t0.setShape(shape); - assertTrue(AnimationShim.impl_startable(t0,false)); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,false)); + assertTrue(AnimationShim.startable(t0,true)); // fromValue t0.setFromValue(null); shape.setFill(paint2); - assertTrue(AnimationShim.impl_startable(t0,false)); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,false)); + assertFalse(AnimationShim.startable(t0,true)); shape.setFill(Color.BLACK); - assertTrue(AnimationShim.impl_startable(t0,false)); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,false)); + assertTrue(AnimationShim.startable(t0,true)); t0.setFromValue(Color.WHITE); shape.setFill(paint2); - assertTrue(AnimationShim.impl_startable(t0,false)); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,false)); + assertTrue(AnimationShim.startable(t0,true)); // toValue t0.setToValue(null); - assertTrue(AnimationShim.impl_startable(t0,false)); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,false)); + assertFalse(AnimationShim.startable(t0,true)); t0.setToValue(Color.BLACK); - assertTrue(AnimationShim.impl_startable(t0,false)); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,false)); + assertTrue(AnimationShim.startable(t0,true)); } @Test @@ -341,21 +341,21 @@ // first run shape.setFill(Color.GREY); - assertTrue(AnimationShim.impl_startable(t0,false)); - AnimationShim.impl_start(t0,false); + assertTrue(AnimationShim.startable(t0,false)); + AnimationShim.doStart(t0,false); shape.setFill(Color.TRANSPARENT); TransitionShim.interpolate(t0,0.0); assertColorEquals(Color.GREY, shape.getFill()); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // second run shape.setFill(Color.BLACK); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); shape.setFill(Color.WHITE); TransitionShim.interpolate(t0,0.0); assertColorEquals(Color.BLACK, shape.getFill()); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } } --- old/modules/graphics/src/test/java/test/javafx/animation/ParallelTransitionPlayTest.java 2016-04-29 10:55:56.766730100 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/ParallelTransitionPlayTest.java 2016-04-29 10:55:56.388637600 -0700 @@ -96,8 +96,8 @@ } @Override - public void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + public void sync(boolean forceSync) { + super.sync(forceSync); if (forceSync) { lastX = xProperty.get(); } --- old/modules/graphics/src/test/java/test/javafx/animation/RotateTransitionTest.java 2016-04-29 10:55:58.869516700 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/RotateTransitionTest.java 2016-04-29 10:55:58.538640100 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -137,15 +137,15 @@ t0.setFromAngle(0.5); t0.setToAngle(1.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(0.5, node.getRotate(), EPSILON); TransitionShim.interpolate(t0,0.4); assertEquals(0.7, node.getRotate(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(1.0, node.getRotate(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -155,17 +155,17 @@ final RotateTransition t0 = new RotateTransition(ONE_SEC, node); t0.setAxis(axis); node.setRotationAxis(defaultAxis); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); assertEquals(axis, node.getRotationAxis()); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); t0.setAxis(null); node.setRotationAxis(defaultAxis); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); assertEquals(defaultAxis, node.getRotationAxis()); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -181,104 +181,104 @@ t0.setFromAngle(Double.NaN); t0.setToAngle(Double.NaN); t0.setByAngle(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalAngle, node.getRotate(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalAngle, node.getRotate(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only from-value set node.setRotate(originalAngle); t0.setFromAngle(fromAngle); t0.setToAngle(Double.NaN); t0.setByAngle(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromAngle, node.getRotate(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromAngle, node.getRotate(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only to-value set node.setRotate(originalAngle); t0.setFromAngle(Double.NaN); t0.setToAngle(toAngle); t0.setByAngle(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalAngle, node.getRotate(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toAngle, node.getRotate(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only by-value set node.setRotate(originalAngle); t0.setFromAngle(Double.NaN); t0.setToAngle(Double.NaN); t0.setByAngle(byAngle); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalAngle, node.getRotate(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalAngle + byAngle, node.getRotate(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and to-values set node.setRotate(originalAngle); t0.setFromAngle(fromAngle); t0.setToAngle(toAngle); t0.setByAngle(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromAngle, node.getRotate(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toAngle, node.getRotate(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and by-values set node.setRotate(originalAngle); t0.setFromAngle(fromAngle); t0.setToAngle(Double.NaN); t0.setByAngle(byAngle); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromAngle, node.getRotate(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromAngle + byAngle, node.getRotate(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // to- and by-values set node.setRotate(originalAngle); t0.setFromAngle(Double.NaN); t0.setToAngle(toAngle); t0.setByAngle(byAngle); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalAngle, node.getRotate(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toAngle, node.getRotate(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // all values set node.setRotate(originalAngle); t0.setFromAngle(fromAngle); t0.setToAngle(toAngle); t0.setByAngle(byAngle); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromAngle, node.getRotate(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toAngle, node.getRotate(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -293,25 +293,25 @@ pt.setNode(node2); // node set, parent set - assertTrue(AnimationShim.impl_startable(rt,true)); - AnimationShim.impl_start(rt,true); + assertTrue(AnimationShim.startable(rt,true)); + AnimationShim.doStart(rt,true); TransitionShim.interpolate(rt,0.5); assertEquals(0.75, node.getRotate(), EPSILON); assertEquals(0.0, node2.getRotate(), EPSILON); - AnimationShim.impl_finished(rt); + AnimationShim.finished(rt); // node null, parent set rt.setNode(null); - assertTrue(AnimationShim.impl_startable(rt,true)); - AnimationShim.impl_start(rt,true); + assertTrue(AnimationShim.startable(rt,true)); + AnimationShim.doStart(rt,true); TransitionShim.interpolate(rt,0.4); assertEquals(0.75, node.getRotate(), EPSILON); assertEquals(0.7, node2.getRotate(), EPSILON); - AnimationShim.impl_finished(rt); + AnimationShim.finished(rt); // node null, parent null pt.setNode(null); - assertFalse(AnimationShim.impl_startable(rt,true)); + assertFalse(AnimationShim.startable(rt,true)); } @Test @@ -322,64 +322,64 @@ rt.setToAngle(1.0); // start - assertTrue(AnimationShim.impl_startable(rt,true)); - AnimationShim.impl_start(rt,true); + assertTrue(AnimationShim.startable(rt,true)); + AnimationShim.doStart(rt,true); rt.setFromAngle(0.0); TransitionShim.interpolate(rt,0.5); assertEquals(0.75, node.getRotate(), EPSILON); - AnimationShim.impl_finished(rt); + AnimationShim.finished(rt); rt.setFromAngle(0.5); // end - assertTrue(AnimationShim.impl_startable(rt,true)); - AnimationShim.impl_start(rt,true); + assertTrue(AnimationShim.startable(rt,true)); + AnimationShim.doStart(rt,true); rt.setToAngle(0.0); TransitionShim.interpolate(rt,0.2); assertEquals(0.6, node.getRotate(), EPSILON); - AnimationShim.impl_finished(rt); + AnimationShim.finished(rt); rt.setToAngle(1.0); // node - assertTrue(AnimationShim.impl_startable(rt,true)); - AnimationShim.impl_start(rt,true); + assertTrue(AnimationShim.startable(rt,true)); + AnimationShim.doStart(rt,true); rt.setNode(null); TransitionShim.interpolate(rt,0.7); assertEquals(0.85, node.getRotate(), EPSILON); - AnimationShim.impl_finished(rt); + AnimationShim.finished(rt); rt.setNode(node); // interpolator - assertTrue(AnimationShim.impl_startable(rt,true)); - AnimationShim.impl_start(rt,true); + assertTrue(AnimationShim.startable(rt,true)); + AnimationShim.doStart(rt,true); rt.setInterpolator(null); TransitionShim.interpolate(rt,0.1); assertEquals(0.55, node.getRotate(), EPSILON); - AnimationShim.impl_finished(rt); + AnimationShim.finished(rt); rt.setInterpolator(Interpolator.LINEAR); } @Test public void testStartable() { final RotateTransition t0 = new RotateTransition(Duration.ONE, node); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // duration is 0 t0.setDuration(Duration.ZERO); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setDuration(Duration.ONE); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // node is null t0.setNode(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setNode(node); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // interpolator is null t0.setInterpolator(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setInterpolator(Interpolator.LINEAR); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); } @Test @@ -388,21 +388,21 @@ // first run node.setRotate(0.6); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); node.setRotate(0.8); TransitionShim.interpolate(t0,0.0); assertEquals(0.6, node.getRotate(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // second run node.setRotate(0.2); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); node.setRotate(0.8); TransitionShim.interpolate(t0,0.0); assertEquals(0.2, node.getRotate(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } } --- old/modules/graphics/src/test/java/test/javafx/animation/ScaleTransitionTest.java 2016-04-29 10:56:00.921779500 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/ScaleTransitionTest.java 2016-04-29 10:56:00.589472600 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -170,8 +170,8 @@ t0.setFromZ(1.5); t0.setToZ(0.5); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(0.5, node.getScaleX(), EPSILON); assertEquals(1.5, node.getScaleY(), EPSILON); @@ -184,7 +184,7 @@ assertEquals(1.0, node.getScaleX(), EPSILON); assertEquals(2.0, node.getScaleY(), EPSILON); assertEquals(0.5, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -200,104 +200,104 @@ t0.setFromX(Double.NaN); t0.setToX(Double.NaN); t0.setByX(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getScaleX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue, node.getScaleX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only from-value set node.setScaleX(originalValue); t0.setFromX(fromValue); t0.setToX(Double.NaN); t0.setByX(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getScaleX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue, node.getScaleX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only to-value set node.setScaleX(originalValue); t0.setFromX(Double.NaN); t0.setToX(toValue); t0.setByX(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getScaleX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getScaleX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only by-value set node.setScaleX(originalValue); t0.setFromX(Double.NaN); t0.setToX(Double.NaN); t0.setByX(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getScaleX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue + byValue, node.getScaleX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and to-values set node.setScaleX(originalValue); t0.setFromX(fromValue); t0.setToX(toValue); t0.setByX(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getScaleX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getScaleX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and by-values set node.setScaleX(originalValue); t0.setFromX(fromValue); t0.setToX(Double.NaN); t0.setByX(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getScaleX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue + byValue, node.getScaleX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // to- and by-values set node.setScaleX(originalValue); t0.setFromX(Double.NaN); t0.setToX(toValue); t0.setByX(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getScaleX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getScaleX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // all values set node.setScaleX(originalValue); t0.setFromX(fromValue); t0.setToX(toValue); t0.setByX(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getScaleX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getScaleX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -313,104 +313,104 @@ t0.setFromY(Double.NaN); t0.setToY(Double.NaN); t0.setByY(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getScaleY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue, node.getScaleY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only from-value set node.setScaleY(originalValue); t0.setFromY(fromValue); t0.setToY(Double.NaN); t0.setByY(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getScaleY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue, node.getScaleY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only to-value set node.setScaleY(originalValue); t0.setFromY(Double.NaN); t0.setToY(toValue); t0.setByY(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getScaleY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getScaleY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only by-value set node.setScaleY(originalValue); t0.setFromY(Double.NaN); t0.setToY(Double.NaN); t0.setByY(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getScaleY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue + byValue, node.getScaleY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and to-values set node.setScaleY(originalValue); t0.setFromY(fromValue); t0.setToY(toValue); t0.setByY(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getScaleY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getScaleY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and by-values set node.setScaleY(originalValue); t0.setFromY(fromValue); t0.setToY(Double.NaN); t0.setByY(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getScaleY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue + byValue, node.getScaleY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // to- and by-values set node.setScaleY(originalValue); t0.setFromY(Double.NaN); t0.setToY(toValue); t0.setByY(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getScaleY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getScaleY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // all values set node.setScaleY(originalValue); t0.setFromY(fromValue); t0.setToY(toValue); t0.setByY(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getScaleY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getScaleY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -426,104 +426,104 @@ t0.setFromZ(Double.NaN); t0.setToZ(Double.NaN); t0.setByZ(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getScaleZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only from-value set node.setScaleZ(originalValue); t0.setFromZ(fromValue); t0.setToZ(Double.NaN); t0.setByZ(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getScaleZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only to-value set node.setScaleZ(originalValue); t0.setFromZ(Double.NaN); t0.setToZ(toValue); t0.setByZ(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getScaleZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only by-value set node.setScaleZ(originalValue); t0.setFromZ(Double.NaN); t0.setToZ(Double.NaN); t0.setByZ(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getScaleZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue + byValue, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and to-values set node.setScaleZ(originalValue); t0.setFromZ(fromValue); t0.setToZ(toValue); t0.setByZ(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getScaleZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and by-values set node.setScaleZ(originalValue); t0.setFromZ(fromValue); t0.setToZ(Double.NaN); t0.setByZ(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getScaleZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue + byValue, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // to- and by-values set node.setScaleZ(originalValue); t0.setFromZ(Double.NaN); t0.setToZ(toValue); t0.setByZ(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getScaleZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // all values set node.setScaleZ(originalValue); t0.setFromZ(fromValue); t0.setToZ(toValue); t0.setByZ(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getScaleZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -538,25 +538,25 @@ pt.setNode(node2); // node set, parent set - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.5); assertEquals(0.75, node.getScaleX(), EPSILON); assertEquals(1.0, node2.getScaleX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // node null, parent set t0.setNode(null); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.4); assertEquals(0.75, node.getScaleX(), EPSILON); assertEquals(0.7, node2.getScaleX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // node null, parent null pt.setNode(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); } @Test @@ -571,8 +571,8 @@ t0.setToZ(0.5); // start - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); t0.setFromX(0.0); t0.setFromY(-1.0); t0.setFromZ(0.5); @@ -580,14 +580,14 @@ assertEquals(0.75, node.getScaleX(), EPSILON); assertEquals(1.75, node.getScaleY(), EPSILON); assertEquals(1.0, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); t0.setFromX(0.5); t0.setFromY(1.5); t0.setFromZ(1.5); // end - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); t0.setToX(0.0); t0.setFromY(-1.0); t0.setFromZ(1.5); @@ -595,52 +595,52 @@ assertEquals(0.6, node.getScaleX(), EPSILON); assertEquals(1.6, node.getScaleY(), EPSILON); assertEquals(1.3, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); t0.setToX(1.0); t0.setToY(2.0); t0.setToZ(0.5); // node - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); t0.setNode(null); TransitionShim.interpolate(t0,0.7); assertEquals(0.85, node.getScaleX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); t0.setNode(node); // interpolator - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); t0.setInterpolator(null); TransitionShim.interpolate(t0,0.1); assertEquals(0.55, node.getScaleX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); t0.setInterpolator(Interpolator.LINEAR); } @Test public void testStartable() { final ScaleTransition t0 = new ScaleTransition(Duration.ONE, node); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // duration is 0 t0.setDuration(Duration.ZERO); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setDuration(Duration.ONE); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // node is null t0.setNode(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setNode(node); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // interpolator is null t0.setInterpolator(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setInterpolator(Interpolator.LINEAR); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); } @Test @@ -654,8 +654,8 @@ node.setScaleX( 0.6); node.setScaleY( 1.6); node.setScaleZ(-0.6); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); node.setScaleX(0.8); node.setScaleY(0.8); node.setScaleZ(0.8); @@ -663,14 +663,14 @@ assertEquals( 0.6, node.getScaleX(), EPSILON); assertEquals( 1.6, node.getScaleY(), EPSILON); assertEquals(-0.6, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // second run node.setScaleX( 0.2); node.setScaleY(-2.2); node.setScaleZ(11.2); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); node.setScaleX(0.8); node.setScaleY(0.8); node.setScaleZ(0.8); @@ -678,7 +678,7 @@ assertEquals( 0.2, node.getScaleX(), EPSILON); assertEquals(-2.2, node.getScaleY(), EPSILON); assertEquals(11.2, node.getScaleZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } } --- old/modules/graphics/src/test/java/test/javafx/animation/SequentialTransitionPlayTest.java 2016-04-29 10:56:03.095605300 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/SequentialTransitionPlayTest.java 2016-04-29 10:56:02.739625000 -0700 @@ -99,8 +99,8 @@ } @Override - public void impl_sync(boolean forceSync) { - super.impl_sync(forceSync); + public void sync(boolean forceSync) { + super.sync(forceSync); if (forceSync) { lastX = xProperty.get(); } --- old/modules/graphics/src/test/java/test/javafx/animation/StrokeTransitionTest.java 2016-04-29 10:56:05.213938600 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/StrokeTransitionTest.java 2016-04-29 10:56:04.865993200 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -126,15 +126,15 @@ final Color toValue = Color.color(0.8, 0.4, 0.2, 0.9); final StrokeTransition t0 = new StrokeTransition(ONE_SEC, shape, fromValue, toValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertColorEquals(Color.color(0.2, 0.3, 0.7, 0.1), shape.getStroke()); TransitionShim.interpolate(t0,0.4); assertColorEquals(Color.color(0.44, 0.34, 0.5, 0.42), shape.getStroke()); TransitionShim.interpolate(t0,1.0); assertColorEquals(Color.color(0.8, 0.4, 0.2, 0.9), shape.getStroke()); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -148,20 +148,20 @@ // no from value set shape.setStroke(originalValue); t0.setFromValue(null); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertColorEquals(originalValue, shape.getStroke()); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from-value set shape.setStroke(originalValue); t0.setFromValue(fromValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertColorEquals(fromValue, shape.getStroke()); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -178,29 +178,29 @@ shape2.setStroke(Color.WHITE); // node set, parent set - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); TransitionShim.interpolate(ft,0.5); assertColorEquals(Color.color(0.5, 0.6, 0.7, 0.7), shape.getStroke()); assertColorEquals(Color.WHITE, shape2.getStroke()); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); // node null, parent set ft.setShape(null); - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); TransitionShim.interpolate(ft,0.4); assertColorEquals(Color.color(0.5, 0.6, 0.7, 0.7), shape.getStroke()); assertColorEquals(Color.color(0.4, 0.56, 0.72, 0.76), shape2.getStroke()); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); // node null, parent not shape set pt.setNode(new Group()); - assertFalse(AnimationShim.impl_startable(ft,true)); + assertFalse(AnimationShim.startable(ft,true)); // node null, parent null pt.setNode(null); - assertFalse(AnimationShim.impl_startable(ft,true)); + assertFalse(AnimationShim.startable(ft,true)); } @Test @@ -211,39 +211,39 @@ ft.setInterpolator(Interpolator.LINEAR); // start - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); ft.setFromValue(Color.WHITE); TransitionShim.interpolate(ft,0.5); assertColorEquals(Color.color(0.5, 0.6, 0.7, 0.3), shape.getStroke()); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); ft.setFromValue(fromValue); // end - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); ft.setToValue(Color.BLACK); TransitionShim.interpolate(ft,0.2); assertColorEquals(Color.color(0.2, 0.48, 0.76, 0.24), shape.getStroke()); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); ft.setToValue(toValue); // shape - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); ft.setShape(null); TransitionShim.interpolate(ft,0.7); assertColorEquals(Color.color(0.7, 0.68, 0.66, 0.34), shape.getStroke()); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); ft.setShape(shape); // interpolator - assertTrue(AnimationShim.impl_startable(ft,true)); - AnimationShim.impl_start(ft,true); + assertTrue(AnimationShim.startable(ft,true)); + AnimationShim.doStart(ft,true); ft.setInterpolator(null); TransitionShim.interpolate(ft,0.1); assertColorEquals(Color.color(0.1, 0.44, 0.78, 0.22), shape.getStroke()); - AnimationShim.impl_finished(ft); + AnimationShim.finished(ft); ft.setInterpolator(Interpolator.LINEAR); } @@ -252,41 +252,41 @@ final StrokeTransition t0 = new StrokeTransition(Duration.ONE, shape, Color.WHITE, Color.BLACK); final Paint paint2 = new LinearGradient(0, 0, 1, 1, false, null, new Stop[] { new Stop(0, Color.RED) }); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // duration is 0 t0.setDuration(Duration.ZERO); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setDuration(Duration.ONE); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // shape is null t0.setShape(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setShape(shape); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // interpolator is null t0.setInterpolator(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setInterpolator(Interpolator.LINEAR); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // fromValue t0.setFromValue(null); shape.setStroke(paint2); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); shape.setStroke(Color.BLACK); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); t0.setFromValue(Color.WHITE); shape.setStroke(paint2); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // toValue t0.setToValue(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setToValue(Color.BLACK); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); } @Test @@ -295,21 +295,21 @@ // first run shape.setStroke(Color.GREY); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); shape.setStroke(Color.TRANSPARENT); TransitionShim.interpolate(t0,0.0); assertColorEquals(Color.GREY, shape.getStroke()); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // second run shape.setStroke(Color.BLACK); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); shape.setStroke(Color.WHITE); TransitionShim.interpolate(t0,0.0); assertColorEquals(Color.BLACK, shape.getStroke()); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } } --- old/modules/graphics/src/test/java/test/javafx/animation/TransitionTest.java 2016-04-29 10:56:07.263043600 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/TransitionTest.java 2016-04-29 10:56:06.899502100 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -93,39 +93,39 @@ @Test public void testStart() { - transition.impl_start(true); + transition.doStart(true); transition.setInterpolator(Interpolator.DISCRETE); assertEquals(DEFAULT_INTERPOLATOR, transition.getCachedInterpolator()); transition.shim_impl_finished(); - transition.impl_start(true); + transition.doStart(true); assertEquals(Interpolator.DISCRETE, transition.getCachedInterpolator()); transition.shim_impl_finished(); } @Test public void testPlayTo() { - assertTrue(transition.impl_startable(true)); + assertTrue(transition.startable(true)); // normal play with linear interpolator transition.setInterpolator(Interpolator.LINEAR); - transition.impl_start(true); - transition.impl_playTo(0, 2); + transition.doStart(true); + transition.doPlayTo(0, 2); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_playTo(1, 2); + transition.doPlayTo(1, 2); assertEquals(0.5, transition.frac, EPSILON); - transition.impl_playTo(2, 2); + transition.doPlayTo(2, 2); assertEquals(1.0, transition.frac, EPSILON); transition.shim_impl_finished(); // normal play with discrete interpolator transition.setInterpolator(Interpolator.DISCRETE); - transition.impl_start(true); - transition.impl_playTo(0, 2); + transition.doStart(true); + transition.doPlayTo(0, 2); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_playTo(1, 2); + transition.doPlayTo(1, 2); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_playTo(2, 2); + transition.doPlayTo(2, 2); assertEquals(1.0, transition.frac, EPSILON); transition.shim_impl_finished(); @@ -134,52 +134,52 @@ @Test public void testJumpTo() { // not running - transition.impl_jumpTo(0, 2, false); + transition.doJumpTo(0, 2, false); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_jumpTo(1, 2, false); + transition.doJumpTo(1, 2, false); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_jumpTo(2, 2, false); + transition.doJumpTo(2, 2, false); assertEquals(0.0, transition.frac, EPSILON); // running with linear interpolator transition.setInterpolator(Interpolator.LINEAR); - assertTrue(transition.impl_startable(true)); - transition.impl_start(true); - transition.impl_jumpTo(0, 2, false); + assertTrue(transition.startable(true)); + transition.doStart(true); + transition.doJumpTo(0, 2, false); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_jumpTo(1, 2, false); + transition.doJumpTo(1, 2, false); assertEquals(0.5, transition.frac, EPSILON); - transition.impl_jumpTo(2, 2, false); + transition.doJumpTo(2, 2, false); assertEquals(1.0, transition.frac, EPSILON); // paused with linear interpolator - transition.impl_pause(); - transition.impl_jumpTo(0, 2, false); + transition.doPause(); + transition.doJumpTo(0, 2, false); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_jumpTo(1, 2, false); + transition.doJumpTo(1, 2, false); assertEquals(0.5, transition.frac, EPSILON); - transition.impl_jumpTo(2, 2, false); + transition.doJumpTo(2, 2, false); assertEquals(1.0, transition.frac, EPSILON); transition.shim_impl_finished(); // running with discrete interpolator transition.setInterpolator(Interpolator.DISCRETE); - assertTrue(transition.impl_startable(true)); - transition.impl_start(true); - transition.impl_jumpTo(0, 2, false); + assertTrue(transition.startable(true)); + transition.doStart(true); + transition.doJumpTo(0, 2, false); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_jumpTo(1, 2, false); + transition.doJumpTo(1, 2, false); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_jumpTo(2, 2, false); + transition.doJumpTo(2, 2, false); assertEquals(1.0, transition.frac, EPSILON); // paused with discrete interpolator - transition.impl_pause(); - transition.impl_jumpTo(0, 2, false); + transition.doPause(); + transition.doJumpTo(0, 2, false); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_jumpTo(1, 2, false); + transition.doJumpTo(1, 2, false); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_jumpTo(2, 2, false); + transition.doJumpTo(2, 2, false); assertEquals(1.0, transition.frac, EPSILON); transition.shim_impl_finished(); } @@ -190,30 +190,30 @@ public void testForcedJumpTo() { transition.setInterpolator(Interpolator.LINEAR); // not running - transition.impl_jumpTo(0, 2, true); + transition.doJumpTo(0, 2, true); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_jumpTo(1, 2, true); + transition.doJumpTo(1, 2, true); assertEquals(0.5, transition.frac, EPSILON); - transition.impl_jumpTo(2, 2, true); + transition.doJumpTo(2, 2, true); assertEquals(1.0, transition.frac, EPSILON); // running with linear interpolator - assertTrue(transition.impl_startable(true)); - transition.impl_start(true); - transition.impl_jumpTo(0, 2, true); + assertTrue(transition.startable(true)); + transition.doStart(true); + transition.doJumpTo(0, 2, true); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_jumpTo(1, 2, true); + transition.doJumpTo(1, 2, true); assertEquals(0.5, transition.frac, EPSILON); - transition.impl_jumpTo(2, 2, true); + transition.doJumpTo(2, 2, true); assertEquals(1.0, transition.frac, EPSILON); // paused with linear interpolator - transition.impl_pause(); - transition.impl_jumpTo(0, 2, true); + transition.doPause(); + transition.doJumpTo(0, 2, true); assertEquals(0.0, transition.frac, EPSILON); - transition.impl_jumpTo(1, 2, true); + transition.doJumpTo(1, 2, true); assertEquals(0.5, transition.frac, EPSILON); - transition.impl_jumpTo(2, 2, true); + transition.doJumpTo(2, 2, true); assertEquals(1.0, transition.frac, EPSILON); transition.shim_impl_finished(); --- old/modules/graphics/src/test/java/test/javafx/animation/TranslateTransitionTest.java 2016-04-29 10:56:09.279883100 -0700 +++ new/modules/graphics/src/test/java/test/javafx/animation/TranslateTransitionTest.java 2016-04-29 10:56:08.932209000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -170,8 +170,8 @@ t0.setFromZ(1.5); t0.setToZ(0.5); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(0.5, node.getTranslateX(), EPSILON); assertEquals(1.5, node.getTranslateY(), EPSILON); @@ -184,7 +184,7 @@ assertEquals(1.0, node.getTranslateX(), EPSILON); assertEquals(2.0, node.getTranslateY(), EPSILON); assertEquals(0.5, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -200,104 +200,104 @@ t0.setFromX(Double.NaN); t0.setToX(Double.NaN); t0.setByX(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getTranslateX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue, node.getTranslateX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only from-value set node.setTranslateX(originalValue); t0.setFromX(fromValue); t0.setToX(Double.NaN); t0.setByX(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getTranslateX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue, node.getTranslateX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only to-value set node.setTranslateX(originalValue); t0.setFromX(Double.NaN); t0.setToX(toValue); t0.setByX(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getTranslateX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getTranslateX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only by-value set node.setTranslateX(originalValue); t0.setFromX(Double.NaN); t0.setToX(Double.NaN); t0.setByX(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getTranslateX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue + byValue, node.getTranslateX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and to-values set node.setTranslateX(originalValue); t0.setFromX(fromValue); t0.setToX(toValue); t0.setByX(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getTranslateX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getTranslateX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and by-values set node.setTranslateX(originalValue); t0.setFromX(fromValue); t0.setToX(Double.NaN); t0.setByX(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getTranslateX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue + byValue, node.getTranslateX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // to- and by-values set node.setTranslateX(originalValue); t0.setFromX(Double.NaN); t0.setToX(toValue); t0.setByX(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getTranslateX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getTranslateX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // all values set node.setTranslateX(originalValue); t0.setFromX(fromValue); t0.setToX(toValue); t0.setByX(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getTranslateX(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getTranslateX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -313,104 +313,104 @@ t0.setFromY(Double.NaN); t0.setToY(Double.NaN); t0.setByY(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getTranslateY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue, node.getTranslateY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only from-value set node.setTranslateY(originalValue); t0.setFromY(fromValue); t0.setToY(Double.NaN); t0.setByY(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getTranslateY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue, node.getTranslateY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only to-value set node.setTranslateY(originalValue); t0.setFromY(Double.NaN); t0.setToY(toValue); t0.setByY(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getTranslateY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getTranslateY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only by-value set node.setTranslateY(originalValue); t0.setFromY(Double.NaN); t0.setToY(Double.NaN); t0.setByY(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getTranslateY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue + byValue, node.getTranslateY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and to-values set node.setTranslateY(originalValue); t0.setFromY(fromValue); t0.setToY(toValue); t0.setByY(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getTranslateY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getTranslateY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and by-values set node.setTranslateY(originalValue); t0.setFromY(fromValue); t0.setToY(Double.NaN); t0.setByY(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getTranslateY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue + byValue, node.getTranslateY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // to- and by-values set node.setTranslateY(originalValue); t0.setFromY(Double.NaN); t0.setToY(toValue); t0.setByY(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getTranslateY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getTranslateY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // all values set node.setTranslateY(originalValue); t0.setFromY(fromValue); t0.setToY(toValue); t0.setByY(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getTranslateY(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getTranslateY(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -426,104 +426,104 @@ t0.setFromZ(Double.NaN); t0.setToZ(Double.NaN); t0.setByZ(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getTranslateZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only from-value set node.setTranslateZ(originalValue); t0.setFromZ(fromValue); t0.setToZ(Double.NaN); t0.setByZ(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getTranslateZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only to-value set node.setTranslateZ(originalValue); t0.setFromZ(Double.NaN); t0.setToZ(toValue); t0.setByZ(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getTranslateZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // only by-value set node.setTranslateZ(originalValue); t0.setFromZ(Double.NaN); t0.setToZ(Double.NaN); t0.setByZ(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getTranslateZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(originalValue + byValue, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and to-values set node.setTranslateZ(originalValue); t0.setFromZ(fromValue); t0.setToZ(toValue); t0.setByZ(0.0); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getTranslateZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // from- and by-values set node.setTranslateZ(originalValue); t0.setFromZ(fromValue); t0.setToZ(Double.NaN); t0.setByZ(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getTranslateZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(fromValue + byValue, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // to- and by-values set node.setTranslateZ(originalValue); t0.setFromZ(Double.NaN); t0.setToZ(toValue); t0.setByZ(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(originalValue, node.getTranslateZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // all values set node.setTranslateZ(originalValue); t0.setFromZ(fromValue); t0.setToZ(toValue); t0.setByZ(byValue); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.0); assertEquals(fromValue, node.getTranslateZ(), EPSILON); TransitionShim.interpolate(t0,1.0); assertEquals(toValue, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } @Test @@ -538,25 +538,25 @@ pt.setNode(node2); // node set, parent set - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.5); assertEquals(0.75, node.getTranslateX(), EPSILON); assertEquals(0.0, node2.getTranslateX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // node null, parent set t0.setNode(null); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); TransitionShim.interpolate(t0,0.4); assertEquals(0.75, node.getTranslateX(), EPSILON); assertEquals(0.7, node2.getTranslateX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // node null, parent null pt.setNode(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); } @Test @@ -571,8 +571,8 @@ t0.setToZ(0.5); // start - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); t0.setFromX(0.0); t0.setFromY(-1.0); t0.setFromZ(0.5); @@ -580,14 +580,14 @@ assertEquals(0.75, node.getTranslateX(), EPSILON); assertEquals(1.75, node.getTranslateY(), EPSILON); assertEquals(1.0, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); t0.setFromX(0.5); t0.setFromY(1.5); t0.setFromZ(1.5); // end - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); t0.setToX(0.0); t0.setFromY(-1.0); t0.setFromZ(1.5); @@ -595,52 +595,52 @@ assertEquals(0.6, node.getTranslateX(), EPSILON); assertEquals(1.6, node.getTranslateY(), EPSILON); assertEquals(1.3, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); t0.setToX(1.0); t0.setToY(2.0); t0.setToZ(0.5); // node - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); t0.setNode(null); TransitionShim.interpolate(t0,0.7); assertEquals(0.85, node.getTranslateX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); t0.setNode(node); // interpolator - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); t0.setInterpolator(null); TransitionShim.interpolate(t0,0.1); assertEquals(0.55, node.getTranslateX(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); t0.setInterpolator(Interpolator.LINEAR); } @Test public void testStartable() { final TranslateTransition t0 = new TranslateTransition(Duration.ONE, node); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // duration is 0 t0.setDuration(Duration.ZERO); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setDuration(Duration.ONE); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // node is null t0.setNode(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setNode(node); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); // interpolator is null t0.setInterpolator(null); - assertFalse(AnimationShim.impl_startable(t0,true)); + assertFalse(AnimationShim.startable(t0,true)); t0.setInterpolator(Interpolator.LINEAR); - assertTrue(AnimationShim.impl_startable(t0,true)); + assertTrue(AnimationShim.startable(t0,true)); } @Test @@ -654,8 +654,8 @@ node.setTranslateX( 0.6); node.setTranslateY( 1.6); node.setTranslateZ(-0.6); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); node.setTranslateX(0.8); node.setTranslateY(0.8); node.setTranslateZ(0.8); @@ -663,14 +663,14 @@ assertEquals( 0.6, node.getTranslateX(), EPSILON); assertEquals( 1.6, node.getTranslateY(), EPSILON); assertEquals(-0.6, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); // second run node.setTranslateX( 0.2); node.setTranslateY(-2.2); node.setTranslateZ(11.2); - assertTrue(AnimationShim.impl_startable(t0,true)); - AnimationShim.impl_start(t0,true); + assertTrue(AnimationShim.startable(t0,true)); + AnimationShim.doStart(t0,true); node.setTranslateX(0.8); node.setTranslateY(0.8); node.setTranslateZ(0.8); @@ -678,7 +678,7 @@ assertEquals( 0.2, node.getTranslateX(), EPSILON); assertEquals(-2.2, node.getTranslateY(), EPSILON); assertEquals(11.2, node.getTranslateZ(), EPSILON); - AnimationShim.impl_finished(t0); + AnimationShim.finished(t0); } } --- old/modules/graphics/src/test/java/test/javafx/scene/image/ImageTest.java 2016-04-29 10:56:11.447716800 -0700 +++ new/modules/graphics/src/test/java/test/javafx/scene/image/ImageTest.java 2016-04-29 10:56:11.046983000 -0700 @@ -116,7 +116,7 @@ final Object fakePlatformImage = new Object(); registerImage(fakePlatformImage, 200, 500); - final Image image = Image.impl_fromPlatformImage(fakePlatformImage); + final Image image = Toolkit.getImageAccessor().fromPlatformImage(fakePlatformImage); verifyLoadedImage(image, 0, 0, false, false, 200, 500); } @@ -161,9 +161,9 @@ registerImage(url, 200, 100); final Image placeholderImage1 = - Image.impl_fromPlatformImage(fakePlatformImage1); + Toolkit.getImageAccessor().fromPlatformImage(fakePlatformImage1); final Image placeholderImage2 = - Image.impl_fromPlatformImage(fakePlatformImage2); + Toolkit.getImageAccessor().fromPlatformImage(fakePlatformImage2); final Image image = new Image(url, 500, 200, true, false, true); @@ -203,7 +203,7 @@ final StubAsyncImageLoader finalLoader = getLastAsyncImageLoader(); - assertNull(finalImage.impl_getPlatformImage()); + assertNull(Toolkit.getImageAccessor().getPlatformImage(finalImage)); assertEquals(0, finalImage.getWidth(), 0); assertEquals(0, finalImage.getHeight(), 0); @@ -406,7 +406,7 @@ assertEquals(0, image.getWidth(), 0); assertEquals(0, image.getHeight(), 0); - assertEquals(null, image.impl_getPlatformImage()); + assertEquals(null, Toolkit.getImageAccessor().getPlatformImage(image)); lastAsyncImageLoader.finish(); @@ -428,7 +428,7 @@ observable -> { assertEquals(200, image.getWidth(), 0); assertEquals(100, image.getHeight(), 0); - assertNotNull(image.impl_getPlatformImage()); + assertNotNull(Toolkit.getImageAccessor().getPlatformImage(image)); }; image.widthProperty().addListener(imageChecker); @@ -437,7 +437,7 @@ assertEquals(0, image.getWidth(), 0); assertEquals(0, image.getHeight(), 0); - assertEquals(null, image.impl_getPlatformImage()); + assertEquals(null, Toolkit.getImageAccessor().getPlatformImage(image)); lastAsyncImageLoader.finish(); } @@ -468,7 +468,7 @@ } private static StubPlatformImage getPlatformImage(final Image srcImage) { - final Object unknownPlatformImage = srcImage.impl_getPlatformImage(); + final Object unknownPlatformImage = Toolkit.getImageAccessor().getPlatformImage(srcImage); assertTrue(unknownPlatformImage instanceof StubPlatformImage); return (StubPlatformImage) unknownPlatformImage; } --- old/modules/graphics/src/test/java/test/javafx/scene/image/ImageViewTest.java 2016-04-29 10:56:13.719903800 -0700 +++ new/modules/graphics/src/test/java/test/javafx/scene/image/ImageViewTest.java 2016-04-29 10:56:13.365898700 -0700 @@ -94,7 +94,7 @@ assertNull(pgValue); } else { assertSame( - ((Image) sgValue).impl_getPlatformImage(), + Toolkit.getImageAccessor().getPlatformImage((Image) sgValue), pgValue); } @@ -174,14 +174,14 @@ imageView.setImage(asyncImage); NodeTest.callSyncPGNode(imageView); - assertSame(placeholderImage.impl_getPlatformImage(), + assertSame(Toolkit.getImageAccessor().getPlatformImage(placeholderImage), pgImageView.getImage()); assertBoundsEqual(box(0, 0, 200, 100), imageView.getBoundsInLocal()); lastAsyncImageLoader.finish(); NodeTest.callSyncPGNode(imageView); - assertSame(asyncImage.impl_getPlatformImage(), + assertSame(Toolkit.getImageAccessor().getPlatformImage(asyncImage), pgImageView.getImage()); assertBoundsEqual(box(0, 0, 100, 200), imageView.getBoundsInLocal()); } --- old/modules/graphics/src/test/java/test/javafx/scene/text/FontTest.java 2016-04-29 10:56:15.837692300 -0700 +++ new/modules/graphics/src/test/java/test/javafx/scene/text/FontTest.java 2016-04-29 10:56:15.505392300 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package test.javafx.scene.text; +import com.sun.javafx.text.FontHelper; import static test.com.sun.javafx.test.TestHelper.assertImmutableList; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertNotNull; @@ -140,7 +141,7 @@ @Test public void testSetNative() { - new Font(12).impl_setNativeFont(new Object(), "", "", ""); + FontHelper.setNativeFont(new Font(12), new Object(), "", "", ""); // no assumptions } --- old/modules/swing/src/main/java/javafx/embed/swing/SwingCursors.java 2016-04-29 10:56:17.877423600 -0700 +++ new/modules/swing/src/main/java/javafx/embed/swing/SwingCursors.java 2016-04-29 10:56:17.529954700 -0700 @@ -33,7 +33,6 @@ import com.sun.javafx.cursor.CursorFrame; import com.sun.javafx.cursor.ImageCursorFrame; -import javafx.scene.image.Image; /** * An utility class to translate cursor types between embedded @@ -54,7 +53,7 @@ Point hotspot = new Point((int)scaledHotspotX, (int)scaledHotspotY); BufferedImage awtImage = SwingFXUtils.fromFXImage( - Image.impl_fromPlatformImage(cursorFrame.getPlatformImage()), null); + com.sun.javafx.tk.Toolkit.getImageAccessor().fromPlatformImage(cursorFrame.getPlatformImage()), null); return awtToolkit.createCustomCursor(awtImage, hotspot, null); } --- old/modules/web/src/main/java/com/sun/javafx/webkit/CursorManagerImpl.java 2016-04-29 10:56:19.902141400 -0700 +++ new/modules/web/src/main/java/com/sun/javafx/webkit/CursorManagerImpl.java 2016-04-29 10:56:19.548115000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.javafx.webkit; +import com.sun.javafx.tk.Toolkit; import com.sun.webkit.CursorManager; import com.sun.webkit.graphics.WCGraphicsManager; import com.sun.webkit.graphics.WCImage; @@ -44,7 +45,7 @@ @Override protected Cursor getCustomCursor(WCImage image, int hotspotX, int hotspotY) { return new ImageCursor( - Image.impl_fromPlatformImage( + Toolkit.getImageAccessor().fromPlatformImage( WCGraphicsManager.getGraphicsManager().toPlatformImage(image)), hotspotX, hotspotY); } --- old/modules/web/src/main/java/com/sun/javafx/webkit/PasteboardImpl.java 2016-04-29 10:56:21.917886700 -0700 +++ new/modules/web/src/main/java/com/sun/javafx/webkit/PasteboardImpl.java 2016-04-29 10:56:21.585701100 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.javafx.webkit; +import com.sun.javafx.tk.Toolkit; import com.sun.webkit.Pasteboard; import com.sun.webkit.graphics.WCGraphicsManager; import com.sun.webkit.graphics.WCImageFrame; @@ -64,7 +65,7 @@ @Override public void writeImage(WCImageFrame wcImage) { Object platformImage = WCGraphicsManager.getGraphicsManager(). toPlatformImage(wcImage.getFrame()); - Image fxImage = Image.impl_fromPlatformImage(platformImage); + Image fxImage = Toolkit.getImageAccessor().fromPlatformImage(platformImage); ClipboardContent content = new ClipboardContent(); content.putImage(fxImage); clipboard.setContent(content); --- old/modules/web/src/main/java/com/sun/javafx/webkit/UIClientImpl.java 2016-04-29 10:56:23.950674000 -0700 +++ new/modules/web/src/main/java/com/sun/javafx/webkit/UIClientImpl.java 2016-04-29 10:56:23.619290800 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -281,7 +281,7 @@ File temp = File.createTempFile("jfx", ".png"); temp.deleteOnExit(); ImageIO.write( - toBufferedImage(Image.impl_fromPlatformImage( + toBufferedImage(Toolkit.getImageAccessor().fromPlatformImage( Toolkit.getToolkit().loadPlatformImage( platformImage ) --- old/modules/web/src/main/java/com/sun/javafx/webkit/prism/PrismImage.java 2016-04-29 10:56:26.092981000 -0700 +++ new/modules/web/src/main/java/com/sun/javafx/webkit/prism/PrismImage.java 2016-04-29 10:56:25.745331000 -0700 @@ -25,6 +25,7 @@ package com.sun.javafx.webkit.prism; +import com.sun.javafx.tk.Toolkit; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -64,7 +65,7 @@ @Override protected final String toDataURL(String mimeType) { - Object image = UIClientImpl.toBufferedImage(javafx.scene.image.Image.impl_fromPlatformImage(getImage())); + Object image = UIClientImpl.toBufferedImage(Toolkit.getImageAccessor().fromPlatformImage(getImage())); if (image instanceof BufferedImage) { Iterator it = ImageIO.getImageWritersByMIMEType(mimeType); while (it.hasNext()) { --- /dev/null 2016-04-29 10:56:28.000000000 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/scene/input/ClipboardHelper.java 2016-04-29 10:56:27.678924700 -0700 @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.javafx.scene.input; + +import javafx.scene.input.Clipboard; + +/** + * Used to access internal methods of Clipboard. + */ +public class ClipboardHelper { + + private static ClipboardAccessor clipboardAccessor; + + static { + forceInit(Clipboard.class); + } + + private ClipboardHelper() { + } + + public static boolean contentPut(Clipboard clipboard) { + return clipboardAccessor.contentPut(clipboard); + } + + public static void setClipboardAccessor(final ClipboardAccessor newAccessor) { + if (clipboardAccessor != null) { + throw new IllegalStateException(); + } + + clipboardAccessor = newAccessor; + } + + public interface ClipboardAccessor { + boolean contentPut(Clipboard clipboard); + } + + private static void forceInit(final Class classToInit) { + try { + Class.forName(classToInit.getName(), true, + classToInit.getClassLoader()); + } catch (final ClassNotFoundException e) { + throw new AssertionError(e); // Can't happen + } + } +} --- /dev/null 2016-04-29 10:56:29.000000000 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/scene/input/TouchPointHelper.java 2016-04-29 10:56:29.138194100 -0700 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.javafx.scene.input; + +import javafx.scene.input.TouchPoint; + +/** + * Used to access internal methods of TouchPoint. + */ +public class TouchPointHelper { + + private static TouchPointAccessor touchPointAccessor; + + static { + forceInit(TouchPoint.class); + } + + private TouchPointHelper() { + } + + public static void reset(TouchPoint touchPoint) { + touchPointAccessor.reset(touchPoint); + } + + public static void setTouchPointAccessor(final TouchPointAccessor newAccessor) { + if (touchPointAccessor != null) { + throw new IllegalStateException(); + } + + touchPointAccessor = newAccessor; + } + + public interface TouchPointAccessor { + void reset(TouchPoint touchPoint); + } + + private static void forceInit(final Class classToInit) { + try { + Class.forName(classToInit.getName(), true, + classToInit.getClassLoader()); + } catch (final ClassNotFoundException e) { + throw new AssertionError(e); // Can't happen + } + } +} + --- /dev/null 2016-04-29 10:56:31.000000000 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/scene/paint/MaterialHelper.java 2016-04-29 10:56:30.577351400 -0700 @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.javafx.scene.paint; + +import com.sun.javafx.sg.prism.NGPhongMaterial; +import javafx.beans.property.BooleanProperty; +import javafx.scene.paint.Material; + + +/** + * Used to access internal methods of Material. + */ +public class MaterialHelper { + + private static MaterialAccessor materialAccessor; + + static { + forceInit(Material.class); + } + + private MaterialHelper() { + } + + public static BooleanProperty dirtyProperty(Material material) { + return materialAccessor.dirtyProperty(material); + } + + public static void updatePG(Material material) { + materialAccessor.updatePG(material); + } + + public static NGPhongMaterial getNGMaterial(Material material) { + return materialAccessor.getNGMaterial(material); + } + + public static void setMaterialAccessor(final MaterialAccessor newAccessor) { + if (materialAccessor != null) { + throw new IllegalStateException(); + } + + materialAccessor = newAccessor; + } + + public interface MaterialAccessor { + BooleanProperty dirtyProperty(Material material); + void updatePG(Material material); + NGPhongMaterial getNGMaterial(Material material); + } + + private static void forceInit(final Class classToInit) { + try { + Class.forName(classToInit.getName(), true, + classToInit.getClassLoader()); + } catch (final ClassNotFoundException e) { + throw new AssertionError(e); // Can't happen + } + } +} --- /dev/null 2016-04-29 10:56:32.000000000 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/text/FontHelper.java 2016-04-29 10:56:31.996007900 -0700 @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.javafx.text; + +import javafx.scene.text.Font; + +/** + * Used to access internal methods of Font. + */ +public class FontHelper { + + private static FontAccessor fontAccessor; + + static { + forceInit(Font.class); + } + + private FontHelper() { + } + + public static Object getNativeFont(Font font) { + return fontAccessor.getNativeFont(font); + } + + public static void setNativeFont(Font font, Object f, String nam, + String fam, String styl) { + fontAccessor.setNativeFont(font, f, nam, fam, styl); + } + + public static Font nativeFont(Object f, String name, String family, + String style, double size) { + return fontAccessor.nativeFont(f, name, family, style, size); + } + + public static void setFontAccessor(final FontAccessor newAccessor) { + if (fontAccessor != null) { + throw new IllegalStateException(); + } + + fontAccessor = newAccessor; + } + + public interface FontAccessor { + Object getNativeFont(Font font); + void setNativeFont(Font font, Object f, String nam, String fam, String styl); + Font nativeFont(Object f, String name, String family, String style, double size); + } + + private static void forceInit(final Class classToInit) { + try { + Class.forName(classToInit.getName(), true, + classToInit.getClassLoader()); + } catch (final ClassNotFoundException e) { + throw new AssertionError(e); // Can't happen + } + } +}