< prev index next >
modules/graphics/src/main/java/javafx/scene/image/Image.java
Print this page
@@ -141,10 +141,20 @@
@Override
public int[] getNonPreColors(PixelFormat<ByteBuffer> 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);
+ }
});
}
// Matches strings that start with a valid URI scheme
private static final Pattern URL_QUICKMATCH = Pattern.compile("^\\p{Alpha}[\\p{Alnum}+.-]*:.*$");
@@ -525,18 +535,11 @@
* @treatAsPrivate implementation detail
* @deprecated This is an internal API that is not intended for use and will be removed in the next version
*/
private ObjectPropertyImpl<PlatformImage> 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();
}
final ReadOnlyObjectProperty<PlatformImage> acc_platformImageProperty() {
return platformImagePropertyImpl();
@@ -947,32 +950,24 @@
}
}
}
// 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();
storePlatformImageWH(newPlatformImage, newWidth, newHeight);
< prev index next >