Module com.gluonhq.attach.pictures
Package com.gluonhq.attach.pictures.impl
Class IOSPicturesService
java.lang.Object
com.gluonhq.attach.pictures.impl.IOSPicturesService
- All Implemented Interfaces:
PicturesService
Note:Since iOS 10 requires
NSCameraUsageDescription,
NSPhotoLibraryUsageDescription and
NSPhotoLibraryAddUsageDescription in pList.-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyObjectProperty<javafx.scene.image.Image>A read-only property containing the image taken from the camera or gallery or null if it failed, or it was cancelled. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRetrieve an image from the device's gallery of images.voidasyncTakePhoto(boolean savePhoto) Use the device's camera to take a photo, and retrieve anImage.Retrieve the file associated to the original picture generated bytakePhoto(true)or the file related to the picture selected withPicturesService.loadImageFromGallery().javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.image.Image>A read-only property containing the image taken from the camera or gallery or null if it failed, or it was cancelled.Optional<javafx.scene.image.Image>Retrieve an image from the device's gallery of images, in a blocking way.static voidstatic voidOptional<javafx.scene.image.Image>takePhoto(boolean savePhoto) Use the device's camera to take a photo, in a blocking way, and retrieve anImage.static voidtakePicture(boolean savePhoto)
-
Property Details
-
image
public javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.image.Image> imageProperty- Specified by:
imagePropertyin interfacePicturesService- Returns:
- a read-only object property containing an image that can be null
-
-
Constructor Details
-
IOSPicturesService
public IOSPicturesService()
-
-
Method Details
-
takePhoto
Description copied from interface:PicturesServiceUse the device's camera to take a photo, in a blocking way, and retrieve anImage. It can be saved as well in the device's public album.- Specified by:
takePhotoin interfacePicturesService- Parameters:
savePhoto- if true, image is saved to public album- Returns:
- an Optional with the Image or empty if it failed, or it was cancelled
-
asyncTakePhoto
public void asyncTakePhoto(boolean savePhoto) Description copied from interface:PicturesServiceUse the device's camera to take a photo, and retrieve anImage. It can be saved as well in the device's public album.- Specified by:
asyncTakePhotoin interfacePicturesService- Parameters:
savePhoto- if true, image is saved to public album
-
loadImageFromGallery
Description copied from interface:PicturesServiceRetrieve an image from the device's gallery of images, in a blocking way.- Specified by:
loadImageFromGalleryin interfacePicturesService- Returns:
- an Optional with the Image or empty if it failed, or it was cancelled
-
asyncLoadImageFromGallery
public void asyncLoadImageFromGallery()Description copied from interface:PicturesServiceRetrieve an image from the device's gallery of images.- Specified by:
asyncLoadImageFromGalleryin interfacePicturesService
-
getImageFile
Description copied from interface:PicturesServiceRetrieve the file associated to the original picture generated bytakePhoto(true)or the file related to the picture selected withPicturesService.loadImageFromGallery().- Specified by:
getImageFilein interfacePicturesService- Returns:
- an Optional with the File associated with the original image.
-
imageProperty
public javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.image.Image> imageProperty()Description copied from interface:PicturesServiceA read-only property containing the image taken from the camera or gallery or null if it failed, or it was cancelled.- Specified by:
imagePropertyin interfacePicturesService- Returns:
- a read-only object property containing an image that can be null
-
takePicture
public static void takePicture(boolean savePhoto) -
selectPicture
public static void selectPicture() -
setResult
-