editableProperty())croppedImageProperty()}). This is ideal
for saving memory when saving the image to the server / a databasephotoSupplierProperty())setClipShape(ClipShape))photoProperty() is nullphotoEffectProperty())Note
the values for the zoom and translate properties will all be reset when a new photo is set.
| Modifier and Type | Class and Description |
|---|---|
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final ObjectProperty | |
| public final BooleanProperty | |
| private final ReadOnlyObjectWrapper | |
| private final BooleanProperty | |
| private static final PseudoClass | |
| private FileChooser | |
| private final Logger | |
| private final DoubleProperty | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final DoubleProperty | |
| private final DoubleProperty | |
| private final DoubleProperty | |
| private final ObjectProperty | |
| private static final String[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ObjectProperty | Returns: the clip shape (circle, rectangle)The clip shape determines whether the control will clip the photo via a circle or a rectangle shape. |
| public final BooleanProperty | Returns: true if the view should create the cropped imageSpecifies whether the view should constantly create a cropped image version of the original image whenever the user edits the original. |
| protected Skin | createDefaultSkin()
Overrides javafx. Create a new instance of the default skin for this control. |
| public final ReadOnlyObjectProperty | Returns: the cropped image version of the original imageA read-only property that contains the cropped version of the original image. |
| public final BooleanProperty | Returns: "true" if the view is editableControls whether the user will be able to edit the photo / image. |
| public PhotoView. | |
| public final Image | |
| public final double | |
| public final Image | |
| public final Effect | |
| public Supplier | |
| public final double | |
| public final double | |
| public final double | |
| public final Node | |
| public String | getUserAgentStylesheet()
Overrides javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. |
| public final boolean | |
| public final boolean | |
| public final DoubleProperty | Returns: the maximum zoom value (default 5)Stores the maximum amount that the user will be allowed to zoom into the view. |
| public final ObjectProperty | Returns: the photo effectAn effect that will be applied to the image, not the whole control. |
| public final ObjectProperty | |
| public ObjectProperty | Returns: the photo supplierThe photo supplier will be invoked when the user clicks on the control (or hits space oder enter keys). |
| public final DoubleProperty | Returns: the translate x value (in percent)Stores the percentage-based amount of the horizontal translation. |
| public final DoubleProperty | Returns: the translate y value (in percent)Stores the percentage-based amount of the vertical translation. |
| public final DoubleProperty | Returns: the photo zoomThe zoom applied to the photo so that the photo's content fills out the view as good as possible. |
| public final ObjectProperty | Returns: the placeholder nodeA placeholder that will be shown when no photo / image has been specified. |
| public void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public void | |
| public final void | |
| public final void | |
| public final void | |
| public final void |
| clipShape | back to summary |
|---|---|
| private final ObjectProperty<PhotoView. | |
| createCroppedImage | back to summary |
|---|---|
| public final BooleanProperty createCroppedImage | |
| croppedImage | back to summary |
|---|---|
| private final ReadOnlyObjectWrapper<Image> croppedImage | |
| editable | back to summary |
|---|---|
| private final BooleanProperty editable | |
| EMPTY_PSEUDO_CLASS | back to summary |
|---|---|
| private static final PseudoClass EMPTY_PSEUDO_CLASS | |
| fileChooser | back to summary |
|---|---|
| private FileChooser fileChooser | |
| LOG | back to summary |
|---|---|
| private final Logger LOG | |
| maxZoom | back to summary |
|---|---|
| private final DoubleProperty maxZoom | |
| photo | back to summary |
|---|---|
| private final ObjectProperty<Image> photo | |
| photoEffect | back to summary |
|---|---|
| private final ObjectProperty<Effect> photoEffect | |
| photoSupplier | back to summary |
|---|---|
| private final ObjectProperty<Supplier<Image>> photoSupplier | |
| photoTranslateX | back to summary |
|---|---|
| private final DoubleProperty photoTranslateX | |
| photoTranslateY | back to summary |
|---|---|
| private final DoubleProperty photoTranslateY | |
| photoZoom | back to summary |
|---|---|
| private final DoubleProperty photoZoom | |
| placeholder | back to summary |
|---|---|
| private final ObjectProperty<Node> placeholder | |
| SUPPORTED_EXTENSIONS | back to summary |
|---|---|
| private static final String[] SUPPORTED_EXTENSIONS | |
| PhotoView | back to summary |
|---|---|
| public PhotoView() Constructs a new photo view. | |
| clipShapeProperty | back to summary |
|---|---|
| public ObjectProperty The clip shape determines whether the control will clip the photo via a circle or a rectangle shape.
| |
| createCroppedImageProperty | back to summary |
|---|---|
| public final BooleanProperty createCroppedImageProperty() Specifies whether the view should constantly create a cropped image version of the original image whenever the user edits the original. Creating a cropped image can have a performance impact on slower hardware (e.g. embedded).
| |
| createDefaultSkin | back to summary |
|---|---|
| protected Skin Overrides javafx. Doc from javafx. Create a new instance of the default skin for this control. This is called to create a skin for the control if
no skin is provided via CSS
| |
| croppedImageProperty | back to summary |
|---|---|
| public final ReadOnlyObjectProperty A read-only property that contains the cropped version of the original image. An image becomes cropped when the user moves it around or zooms into it. The cropped image is a good candidate for saving it to the server or database. However, applications can choose freely whether they prefer to store the original image or not.
| |
| editableProperty | back to summary |
|---|---|
| public final BooleanProperty editableProperty() Controls whether the user will be able to edit the photo / image. If editable the control will display a slider below the photo for zooming. The user will also be able to zoom in via pinch zoom or scroll wheel. Via mouse dragging the user can move the photo around.
| |
| getClipShape | back to summary |
|---|---|
| public PhotoView. | |
| getCroppedImage | back to summary |
|---|---|
| public final Image getCroppedImage() | |
| getMaxZoom | back to summary |
|---|---|
| public final double getMaxZoom() | |
| getPhoto | back to summary |
|---|---|
| public final Image getPhoto() | |
| getPhotoEffect | back to summary |
|---|---|
| public final Effect getPhotoEffect() | |
| getPhotoSupplier | back to summary |
|---|---|
| public Supplier | |
| getPhotoTranslateX | back to summary |
|---|---|
| public final double getPhotoTranslateX() | |
| getPhotoTranslateY | back to summary |
|---|---|
| public final double getPhotoTranslateY() | |
| getPhotoZoom | back to summary |
|---|---|
| public final double getPhotoZoom() | |
| getPlaceholder | back to summary |
|---|---|
| public final Node getPlaceholder() | |
| getUserAgentStylesheet | back to summary |
|---|---|
| public String getUserAgentStylesheet() Overrides javafx. Doc from javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. These styles are used in addition to whatever user-agent stylesheets are in use. This provides a mechanism for third parties to introduce styles for custom controls. The URL is a hierarchical URI of the form [scheme:][//authority][path]. If the URL does not have a [scheme:] component, the URL is considered to be the [path] component only. Any leading '/' character of the [path] is ignored and the [path] is treated as a path relative to the root of the application's classpath. Subclasses overriding this method should not assume any particular implementation approach as to the number and frequency with which it is called. For this reason, attempting any kind of dynamic implementation (i.e. returning different user agent stylesheet values) based on some state change is highly discouraged, as there is no guarantee when, or even if, this method will be called. Some JavaFX CSS implementations may choose to cache this response for an indefinite period of time, and therefore there should be no expectation around when this method is called.
For additional information about using CSS with the scene graph,
see the CSS Reference Guide.
| |
| isCreateCroppedImage | back to summary |
|---|---|
| public final boolean isCreateCroppedImage() | |
| isEditable | back to summary |
|---|---|
| public final boolean isEditable() | |
| maxZoomProperty | back to summary |
|---|---|
| public final DoubleProperty maxZoomProperty() Stores the maximum amount that the user will be allowed to zoom into the view. The default value is 5.
| |
| photoEffectProperty | back to summary |
|---|---|
| public final ObjectProperty An effect that will be applied to the image, not the whole control. Applications
could for example apply a sepia effect (see
| |
| photoProperty | back to summary |
|---|---|
| public final ObjectProperty Stores the original photo.
| |
| photoSupplierProperty | back to summary |
|---|---|
| public ObjectProperty The photo supplier will be invoked when the user clicks on the control (or hits space oder enter keys). The default photo supplier registered on the control will bring up a file chooser so that the user can select the image file.
| |
| photoTranslateXProperty | back to summary |
|---|---|
| public final DoubleProperty photoTranslateXProperty() Stores the percentage-based amount of the horizontal translation. We can not use pixel-based translation as the view might change its size. This value changes when the user drags the photo left or right.
| |
| photoTranslateYProperty | back to summary |
|---|---|
| public final DoubleProperty photoTranslateYProperty() Stores the percentage-based amount of the vertical translation. We can not use pixel-based translation as the view might change its size. This value changes when the user drags the photo up or down.
| |
| photoZoomProperty | back to summary |
|---|---|
| public final DoubleProperty photoZoomProperty() The zoom applied to the photo so that the photo's content fills out the view as good as possible.
| |
| placeholderProperty | back to summary |
|---|---|
| public final ObjectProperty A placeholder that will be shown when no photo / image has been specified. The default placeholder prompts the user to "click to add or drop a file".
| |
| setClipShape | back to summary |
|---|---|
| public void setClipShape(PhotoView. | |
| setCreateCroppedImage | back to summary |
|---|---|
| public final void setCreateCroppedImage(boolean createCroppedImage) | |
| setEditable | back to summary |
|---|---|
| public final void setEditable(boolean editable) | |
| setMaxZoom | back to summary |
|---|---|
| public final void setMaxZoom(double maxZoom) | |
| setPhoto | back to summary |
|---|---|
| public final void setPhoto(Image photo) | |
| setPhotoEffect | back to summary |
|---|---|
| public final void setPhotoEffect(Effect photoEffect) | |
| setPhotoSupplier | back to summary |
|---|---|
| public void setPhotoSupplier(Supplier<Image> photoSupplier) | |
| setPhotoTranslateX | back to summary |
|---|---|
| public final void setPhotoTranslateX(double photoTranslateX) | |
| setPhotoTranslateY | back to summary |
|---|---|
| public final void setPhotoTranslateY(double photoTranslateY) | |
| setPhotoZoom | back to summary |
|---|---|
| public final void setPhotoZoom(double photoZoom) | |
| setPlaceholder | back to summary |
|---|---|
| public final void setPlaceholder(Node placeholder) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final PhotoView. | |
| public static final PhotoView. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static PhotoView. | |
| public static PhotoView. |
| CIRCLE | back to summary |
|---|---|
| public static final PhotoView. | |
| RECTANGLE | back to summary |
|---|---|
| public static final PhotoView. | |
| ClipShape | back to summary |
|---|---|
| private ClipShape() | |
| valueOf | back to summary |
|---|---|
| public static PhotoView. | |
| values | back to summary |
|---|---|
| public static PhotoView. | |