Class PhotoView

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.control.Control
com.dlsc.gemsfx.PhotoView
All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget, javafx.scene.control.Skinnable

public class PhotoView extends javafx.scene.control.Control
The photo view is mostly used to display a user profile picture.

Features

  • control can be used as read-only view or as an editor (see editableProperty())
  • picture can moved around by dragging it
  • picture can be resized by pinch zoom (touch) or via scroll wheel
  • control provides a cropped "read only" version of the original image (see @{croppedImageProperty()}). This is ideal for saving memory when saving the image to the server / a database
  • applications can set a custom "photo supplier" to replace the built-in file chooser (see photoSupplierProperty())
  • drag and drop an image file onto the view
  • circular and rectangle shape (see setClipShape(ClipShape))
  • customizable maximum zoom value
  • keyboard support: backspace and delete keys delete the picture, space or enter trigger the file supplier (default: show the file chooser)
  • pseudo class support: "empty" if the photoProperty() is null
  • an effect can be applied directly to the image (see photoEffectProperty())
Note: the values for the zoom and translate properties will all be reset when a new photo is set.
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.beans.property.ObjectProperty<PhotoView.ClipShape>
    The clip shape determines whether the control will clip the photo via a circle or a rectangle shape.
    final javafx.beans.property.BooleanProperty
    Specifies whether the view should constantly create a cropped image version of the original image whenever the user edits the original.
    final javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.image.Image>
    A read-only property that contains the cropped version of the original image.
    final javafx.beans.property.BooleanProperty
    Controls whether the user will be able to edit the photo / image.
    final javafx.beans.property.DoubleProperty
    Stores the maximum amount that the user will be allowed to zoom into the view.
    final javafx.beans.property.ObjectProperty<javafx.scene.effect.Effect>
    An effect that will be applied to the image, not the whole control.
    final javafx.beans.property.ObjectProperty<javafx.scene.image.Image>
    Stores the original photo.
    javafx.beans.property.ObjectProperty<Supplier<javafx.scene.image.Image>>
    The photo supplier will be invoked when the user clicks on the control (or hits space oder enter keys).
    final javafx.beans.property.DoubleProperty
    Stores the percentage-based amount of the horizontal translation.
    final javafx.beans.property.DoubleProperty
    Stores the percentage-based amount of the vertical translation.
    final javafx.beans.property.DoubleProperty
    The zoom applied to the photo so that the photo's content fills out the view as good as possible.
    final javafx.beans.property.ObjectProperty<javafx.scene.Node>
    A placeholder that will be shown when no photo / image has been specified.

    Properties inherited from class javafx.scene.control.Control

    contextMenu, skin, tooltip

    Properties inherited from class javafx.scene.layout.Region

    background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width

    Properties inherited from class javafx.scene.Parent

    needsLayout

    Properties inherited from class javafx.scene.Node

    accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final javafx.beans.property.BooleanProperty
     

    Fields inherited from class javafx.scene.layout.Region

    USE_COMPUTED_SIZE, USE_PREF_SIZE

    Fields inherited from class javafx.scene.Node

    BASELINE_OFFSET_SAME_AS_HEIGHT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new photo view.
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.beans.property.ObjectProperty<PhotoView.ClipShape>
    The clip shape determines whether the control will clip the photo via a circle or a rectangle shape.
    final javafx.beans.property.BooleanProperty
    Specifies whether the view should constantly create a cropped image version of the original image whenever the user edits the original.
    protected javafx.scene.control.Skin<?>
     
    final javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.image.Image>
    A read-only property that contains the cropped version of the original image.
    final javafx.beans.property.BooleanProperty
    Controls whether the user will be able to edit the photo / image.
    Gets the value of the property clipShape.
    final javafx.scene.image.Image
    Gets the value of the property croppedImage.
    final double
    Gets the value of the property maxZoom.
    final javafx.scene.image.Image
    Gets the value of the property photo.
    final javafx.scene.effect.Effect
    Gets the value of the property photoEffect.
    Supplier<javafx.scene.image.Image>
    Gets the value of the property photoSupplier.
    final double
    Gets the value of the property photoTranslateX.
    final double
    Gets the value of the property photoTranslateY.
    final double
    Gets the value of the property photoZoom.
    final javafx.scene.Node
    Gets the value of the property placeholder.
     
    final boolean
    Gets the value of the property createCroppedImage.
    final boolean
    Gets the value of the property editable.
    final javafx.beans.property.DoubleProperty
    Stores the maximum amount that the user will be allowed to zoom into the view.
    final javafx.beans.property.ObjectProperty<javafx.scene.effect.Effect>
    An effect that will be applied to the image, not the whole control.
    final javafx.beans.property.ObjectProperty<javafx.scene.image.Image>
    Stores the original photo.
    javafx.beans.property.ObjectProperty<Supplier<javafx.scene.image.Image>>
    The photo supplier will be invoked when the user clicks on the control (or hits space oder enter keys).
    final javafx.beans.property.DoubleProperty
    Stores the percentage-based amount of the horizontal translation.
    final javafx.beans.property.DoubleProperty
    Stores the percentage-based amount of the vertical translation.
    final javafx.beans.property.DoubleProperty
    The zoom applied to the photo so that the photo's content fills out the view as good as possible.
    final javafx.beans.property.ObjectProperty<javafx.scene.Node>
    A placeholder that will be shown when no photo / image has been specified.
    void
    Sets the value of the property clipShape.
    final void
    setCreateCroppedImage(boolean createCroppedImage)
    Sets the value of the property createCroppedImage.
    final void
    setEditable(boolean editable)
    Sets the value of the property editable.
    final void
    setMaxZoom(double maxZoom)
    Sets the value of the property maxZoom.
    final void
    setPhoto(javafx.scene.image.Image photo)
    Sets the value of the property photo.
    final void
    setPhotoEffect(javafx.scene.effect.Effect photoEffect)
    Sets the value of the property photoEffect.
    void
    setPhotoSupplier(Supplier<javafx.scene.image.Image> photoSupplier)
    Sets the value of the property photoSupplier.
    final void
    setPhotoTranslateX(double photoTranslateX)
    Sets the value of the property photoTranslateX.
    final void
    setPhotoTranslateY(double photoTranslateY)
    Sets the value of the property photoTranslateY.
    final void
    setPhotoZoom(double photoZoom)
    Sets the value of the property photoZoom.
    final void
    setPlaceholder(javafx.scene.Node placeholder)
    Sets the value of the property placeholder.

    Methods inherited from class javafx.scene.control.Control

    computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty

    Methods inherited from class javafx.scene.layout.Region

    backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty

    Methods inherited from class javafx.scene.Parent

    getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds

    Methods inherited from class javafx.scene.Node

    accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface javafx.css.Styleable

    getStyleableNode
  • Property Details

    • createCroppedImage

      public final javafx.beans.property.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).
      See Also:
    • croppedImage

      public final javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.image.Image> croppedImageProperty
      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.
      See Also:
    • photoEffect

      public final javafx.beans.property.ObjectProperty<javafx.scene.effect.Effect> photoEffectProperty
      An effect that will be applied to the image, not the whole control. Applications could for example apply a sepia effect (see SepiaTone).
      See Also:
    • placeholder

      public final javafx.beans.property.ObjectProperty<javafx.scene.Node> placeholderProperty
      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".
      See Also:
    • editable

      public final javafx.beans.property.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.
      See Also:
    • photoSupplier

      public javafx.beans.property.ObjectProperty<Supplier<javafx.scene.image.Image>> photoSupplierProperty
      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.
      See Also:
    • clipShape

      public javafx.beans.property.ObjectProperty<PhotoView.ClipShape> clipShapeProperty
      The clip shape determines whether the control will clip the photo via a circle or a rectangle shape.
      See Also:
    • photo

      public final javafx.beans.property.ObjectProperty<javafx.scene.image.Image> photoProperty
      Stores the original photo.
      See Also:
    • photoZoom

      public final javafx.beans.property.DoubleProperty photoZoomProperty
      The zoom applied to the photo so that the photo's content fills out the view as good as possible.
      See Also:
    • photoTranslateX

      public final javafx.beans.property.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.
      See Also:
    • photoTranslateY

      public final javafx.beans.property.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.
      See Also:
    • maxZoom

      public final javafx.beans.property.DoubleProperty maxZoomProperty
      Stores the maximum amount that the user will be allowed to zoom into the view. The default value is 5.
      See Also:
  • Field Details

    • createCroppedImage

      public final javafx.beans.property.BooleanProperty createCroppedImage
  • Constructor Details

    • PhotoView

      public PhotoView()
      Constructs a new photo view.
  • Method Details

    • createDefaultSkin

      protected javafx.scene.control.Skin<?> createDefaultSkin()
      Overrides:
      createDefaultSkin in class javafx.scene.control.Control
    • getUserAgentStylesheet

      public String getUserAgentStylesheet()
      Overrides:
      getUserAgentStylesheet in class javafx.scene.layout.Region
    • isCreateCroppedImage

      public final boolean isCreateCroppedImage()
      Gets the value of the property createCroppedImage.
      Property description:
      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).
    • createCroppedImageProperty

      public final javafx.beans.property.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).
      See Also:
    • setCreateCroppedImage

      public final void setCreateCroppedImage(boolean createCroppedImage)
      Sets the value of the property createCroppedImage.
      Property description:
      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).
    • getCroppedImage

      public final javafx.scene.image.Image getCroppedImage()
      Gets the value of the property croppedImage.
      Property description:
      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.
    • croppedImageProperty

      public final javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.image.Image> croppedImageProperty()
      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.
      See Also:
    • getPhotoEffect

      public final javafx.scene.effect.Effect getPhotoEffect()
      Gets the value of the property photoEffect.
      Property description:
      An effect that will be applied to the image, not the whole control. Applications could for example apply a sepia effect (see SepiaTone).
    • photoEffectProperty

      public final javafx.beans.property.ObjectProperty<javafx.scene.effect.Effect> photoEffectProperty()
      An effect that will be applied to the image, not the whole control. Applications could for example apply a sepia effect (see SepiaTone).
      See Also:
    • setPhotoEffect

      public final void setPhotoEffect(javafx.scene.effect.Effect photoEffect)
      Sets the value of the property photoEffect.
      Property description:
      An effect that will be applied to the image, not the whole control. Applications could for example apply a sepia effect (see SepiaTone).
    • getPlaceholder

      public final javafx.scene.Node getPlaceholder()
      Gets the value of the property placeholder.
      Property description:
      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".
    • placeholderProperty

      public final javafx.beans.property.ObjectProperty<javafx.scene.Node> placeholderProperty()
      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".
      See Also:
    • setPlaceholder

      public final void setPlaceholder(javafx.scene.Node placeholder)
      Sets the value of the property placeholder.
      Property description:
      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".
    • isEditable

      public final boolean isEditable()
      Gets the value of the property editable.
      Property description:
      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.
    • editableProperty

      public final javafx.beans.property.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.
      See Also:
    • setEditable

      public final void setEditable(boolean editable)
      Sets the value of the property editable.
      Property description:
      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.
    • getPhotoSupplier

      public Supplier<javafx.scene.image.Image> getPhotoSupplier()
      Gets the value of the property photoSupplier.
      Property description:
      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.
    • photoSupplierProperty

      public javafx.beans.property.ObjectProperty<Supplier<javafx.scene.image.Image>> photoSupplierProperty()
      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.
      See Also:
    • setPhotoSupplier

      public void setPhotoSupplier(Supplier<javafx.scene.image.Image> photoSupplier)
      Sets the value of the property photoSupplier.
      Property description:
      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.
    • getClipShape

      public PhotoView.ClipShape getClipShape()
      Gets the value of the property clipShape.
      Property description:
      The clip shape determines whether the control will clip the photo via a circle or a rectangle shape.
    • clipShapeProperty

      public javafx.beans.property.ObjectProperty<PhotoView.ClipShape> clipShapeProperty()
      The clip shape determines whether the control will clip the photo via a circle or a rectangle shape.
      See Also:
    • setClipShape

      public void setClipShape(PhotoView.ClipShape clipShape)
      Sets the value of the property clipShape.
      Property description:
      The clip shape determines whether the control will clip the photo via a circle or a rectangle shape.
    • getPhoto

      public final javafx.scene.image.Image getPhoto()
      Gets the value of the property photo.
      Property description:
      Stores the original photo.
    • photoProperty

      public final javafx.beans.property.ObjectProperty<javafx.scene.image.Image> photoProperty()
      Stores the original photo.
      See Also:
    • setPhoto

      public final void setPhoto(javafx.scene.image.Image photo)
      Sets the value of the property photo.
      Property description:
      Stores the original photo.
    • getPhotoZoom

      public final double getPhotoZoom()
      Gets the value of the property photoZoom.
      Property description:
      The zoom applied to the photo so that the photo's content fills out the view as good as possible.
    • photoZoomProperty

      public final javafx.beans.property.DoubleProperty photoZoomProperty()
      The zoom applied to the photo so that the photo's content fills out the view as good as possible.
      See Also:
    • setPhotoZoom

      public final void setPhotoZoom(double photoZoom)
      Sets the value of the property photoZoom.
      Property description:
      The zoom applied to the photo so that the photo's content fills out the view as good as possible.
    • getPhotoTranslateX

      public final double getPhotoTranslateX()
      Gets the value of the property photoTranslateX.
      Property description:
      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.
    • photoTranslateXProperty

      public final javafx.beans.property.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.
      See Also:
    • setPhotoTranslateX

      public final void setPhotoTranslateX(double photoTranslateX)
      Sets the value of the property photoTranslateX.
      Property description:
      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.
    • getPhotoTranslateY

      public final double getPhotoTranslateY()
      Gets the value of the property photoTranslateY.
      Property description:
      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.
    • photoTranslateYProperty

      public final javafx.beans.property.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.
      See Also:
    • setPhotoTranslateY

      public final void setPhotoTranslateY(double photoTranslateY)
      Sets the value of the property photoTranslateY.
      Property description:
      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.
    • getMaxZoom

      public final double getMaxZoom()
      Gets the value of the property maxZoom.
      Property description:
      Stores the maximum amount that the user will be allowed to zoom into the view. The default value is 5.
    • maxZoomProperty

      public final javafx.beans.property.DoubleProperty maxZoomProperty()
      Stores the maximum amount that the user will be allowed to zoom into the view. The default value is 5.
      See Also:
    • setMaxZoom

      public final void setMaxZoom(double maxZoom)
      Sets the value of the property maxZoom.
      Property description:
      Stores the maximum amount that the user will be allowed to zoom into the view. The default value is 5.