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())
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.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.BooleanPropertySpecifies 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.BooleanPropertyControls whether the user will be able to edit the photo / image.final javafx.beans.property.DoublePropertyStores 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.DoublePropertyStores the percentage-based amount of the horizontal translation.final javafx.beans.property.DoublePropertyStores the percentage-based amount of the vertical translation.final javafx.beans.property.DoublePropertyThe 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, tooltipProperties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties 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 -
Field Summary
FieldsFields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.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.BooleanPropertySpecifies 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.BooleanPropertyControls whether the user will be able to edit the photo / image.Gets the value of theclipShapeproperty.final javafx.scene.image.ImageGets the value of thecroppedImageproperty.final doubleGets the value of themaxZoomproperty.final javafx.scene.image.ImagegetPhoto()Gets the value of thephotoproperty.final javafx.scene.effect.EffectGets the value of thephotoEffectproperty.Supplier<javafx.scene.image.Image>Gets the value of thephotoSupplierproperty.final doubleGets the value of thephotoTranslateXproperty.final doubleGets the value of thephotoTranslateYproperty.final doubleGets the value of thephotoZoomproperty.final javafx.scene.NodeGets the value of theplaceholderproperty.final booleanGets the value of thecreateCroppedImageproperty.final booleanGets the value of theeditableproperty.final javafx.beans.property.DoublePropertyStores 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.DoublePropertyStores the percentage-based amount of the horizontal translation.final javafx.beans.property.DoublePropertyStores the percentage-based amount of the vertical translation.final javafx.beans.property.DoublePropertyThe 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.voidsetClipShape(PhotoView.ClipShape clipShape) Sets the value of theclipShapeproperty.final voidsetCreateCroppedImage(boolean createCroppedImage) Sets the value of thecreateCroppedImageproperty.final voidsetEditable(boolean editable) Sets the value of theeditableproperty.final voidsetMaxZoom(double maxZoom) Sets the value of themaxZoomproperty.final voidsetPhoto(javafx.scene.image.Image photo) Sets the value of thephotoproperty.final voidsetPhotoEffect(javafx.scene.effect.Effect photoEffect) Sets the value of thephotoEffectproperty.voidsetPhotoSupplier(Supplier<javafx.scene.image.Image> photoSupplier) Sets the value of thephotoSupplierproperty.final voidsetPhotoTranslateX(double photoTranslateX) Sets the value of thephotoTranslateXproperty.final voidsetPhotoTranslateY(double photoTranslateY) Sets the value of thephotoTranslateYproperty.final voidsetPhotoZoom(double photoZoom) Sets the value of thephotoZoomproperty.final voidsetPlaceholder(javafx.scene.Node placeholder) Sets the value of theplaceholderproperty.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, tooltipPropertyMethods 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, widthPropertyMethods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods 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, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
createCroppedImage
public final javafx.beans.property.BooleanProperty createCroppedImagePropertySpecifies 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). -
croppedImage
public final javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.image.Image> croppedImagePropertyA 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> photoEffectPropertyAn effect that will be applied to the image, not the whole control. Applications could for example apply a sepia effect (seeSepiaTone). -
placeholder
public final javafx.beans.property.ObjectProperty<javafx.scene.Node> placeholderPropertyA 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". -
editable
public final javafx.beans.property.BooleanProperty editablePropertyControls 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. -
photoSupplier
public javafx.beans.property.ObjectProperty<Supplier<javafx.scene.image.Image>> photoSupplierPropertyThe 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. -
clipShape
The clip shape determines whether the control will clip the photo via a circle or a rectangle shape. -
photo
public final javafx.beans.property.ObjectProperty<javafx.scene.image.Image> photoPropertyStores the original photo.- See Also:
-
photoZoom
public final javafx.beans.property.DoubleProperty photoZoomPropertyThe zoom applied to the photo so that the photo's content fills out the view as good as possible. -
photoTranslateX
public final javafx.beans.property.DoubleProperty photoTranslateXPropertyStores 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. -
photoTranslateY
public final javafx.beans.property.DoubleProperty photoTranslateYPropertyStores 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. -
maxZoom
public final javafx.beans.property.DoubleProperty maxZoomPropertyStores 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:
createDefaultSkinin classjavafx.scene.control.Control
-
getUserAgentStylesheet
- Overrides:
getUserAgentStylesheetin classjavafx.scene.layout.Region
-
isCreateCroppedImage
public final boolean isCreateCroppedImage()Gets the value of thecreateCroppedImageproperty.- 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).
- Returns:
- the value of the
createCroppedImageproperty - See Also:
-
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).- Returns:
- true if the view should create the cropped image
- See Also:
-
setCreateCroppedImage
public final void setCreateCroppedImage(boolean createCroppedImage) Sets the value of thecreateCroppedImageproperty.- 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).
- Parameters:
createCroppedImage- the value for thecreateCroppedImageproperty- See Also:
-
getCroppedImage
public final javafx.scene.image.Image getCroppedImage()Gets the value of thecroppedImageproperty.- 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.
- Returns:
- the value of the
croppedImageproperty - See Also:
-
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.- Returns:
- the cropped image version of the original image
- See Also:
-
getPhotoEffect
public final javafx.scene.effect.Effect getPhotoEffect()Gets the value of thephotoEffectproperty.- 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). - Returns:
- the value of the
photoEffectproperty - See Also:
-
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 (seeSepiaTone).- Returns:
- the photo effect
- See Also:
-
setPhotoEffect
public final void setPhotoEffect(javafx.scene.effect.Effect photoEffect) Sets the value of thephotoEffectproperty.- 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). - Parameters:
photoEffect- the value for thephotoEffectproperty- See Also:
-
getPlaceholder
public final javafx.scene.Node getPlaceholder()Gets the value of theplaceholderproperty.- 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".
- Returns:
- the value of the
placeholderproperty - See Also:
-
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".- Returns:
- the placeholder node
- See Also:
-
setPlaceholder
public final void setPlaceholder(javafx.scene.Node placeholder) Sets the value of theplaceholderproperty.- 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".
- Parameters:
placeholder- the value for theplaceholderproperty- See Also:
-
isEditable
public final boolean isEditable()Gets the value of theeditableproperty.- 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.
- Returns:
- the value of the
editableproperty - See Also:
-
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.- Returns:
- "true" if the view is editable
- See Also:
-
setEditable
public final void setEditable(boolean editable) Sets the value of theeditableproperty.- 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.
- Parameters:
editable- the value for theeditableproperty- See Also:
-
getPhotoSupplier
Gets the value of thephotoSupplierproperty.- 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.
- Returns:
- the value of the
photoSupplierproperty - See Also:
-
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.- Returns:
- the photo supplier
- See Also:
-
setPhotoSupplier
Sets the value of thephotoSupplierproperty.- 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.
- Parameters:
photoSupplier- the value for thephotoSupplierproperty- See Also:
-
getClipShape
Gets the value of theclipShapeproperty.- Property description:
- The clip shape determines whether the control will clip the photo via a circle or a rectangle shape.
- Returns:
- the value of the
clipShapeproperty - See Also:
-
clipShapeProperty
The clip shape determines whether the control will clip the photo via a circle or a rectangle shape.- Returns:
- the clip shape (circle, rectangle)
- See Also:
-
setClipShape
Sets the value of theclipShapeproperty.- Property description:
- The clip shape determines whether the control will clip the photo via a circle or a rectangle shape.
- Parameters:
clipShape- the value for theclipShapeproperty- See Also:
-
getPhoto
public final javafx.scene.image.Image getPhoto()Gets the value of thephotoproperty.- Property description:
- Stores the original photo.
- Returns:
- the value of the
photoproperty - See Also:
-
photoProperty
public final javafx.beans.property.ObjectProperty<javafx.scene.image.Image> photoProperty()Stores the original photo.- Returns:
- the photo
- See Also:
-
setPhoto
public final void setPhoto(javafx.scene.image.Image photo) Sets the value of thephotoproperty.- Property description:
- Stores the original photo.
- Parameters:
photo- the value for thephotoproperty- See Also:
-
getPhotoZoom
public final double getPhotoZoom()Gets the value of thephotoZoomproperty.- Property description:
- The zoom applied to the photo so that the photo's content fills out the view as good as possible.
- Returns:
- the value of the
photoZoomproperty - See Also:
-
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.- Returns:
- the photo zoom
- See Also:
-
setPhotoZoom
public final void setPhotoZoom(double photoZoom) Sets the value of thephotoZoomproperty.- Property description:
- The zoom applied to the photo so that the photo's content fills out the view as good as possible.
- Parameters:
photoZoom- the value for thephotoZoomproperty- See Also:
-
getPhotoTranslateX
public final double getPhotoTranslateX()Gets the value of thephotoTranslateXproperty.- 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.
- Returns:
- the value of the
photoTranslateXproperty - See Also:
-
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.- Returns:
- the translate x value (in percent)
- See Also:
-
setPhotoTranslateX
public final void setPhotoTranslateX(double photoTranslateX) Sets the value of thephotoTranslateXproperty.- 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.
- Parameters:
photoTranslateX- the value for thephotoTranslateXproperty- See Also:
-
getPhotoTranslateY
public final double getPhotoTranslateY()Gets the value of thephotoTranslateYproperty.- 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.
- Returns:
- the value of the
photoTranslateYproperty - See Also:
-
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.- Returns:
- the translate y value (in percent)
- See Also:
-
setPhotoTranslateY
public final void setPhotoTranslateY(double photoTranslateY) Sets the value of thephotoTranslateYproperty.- 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.
- Parameters:
photoTranslateY- the value for thephotoTranslateYproperty- See Also:
-
getMaxZoom
public final double getMaxZoom()Gets the value of themaxZoomproperty.- Property description:
- Stores the maximum amount that the user will be allowed to zoom into the view. The default value is 5.
- Returns:
- the value of the
maxZoomproperty - See Also:
-
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.- Returns:
- the maximum zoom value (default 5)
- See Also:
-
setMaxZoom
public final void setMaxZoom(double maxZoom) Sets the value of themaxZoomproperty.- Property description:
- Stores the maximum amount that the user will be allowed to zoom into the view. The default value is 5.
- Parameters:
maxZoom- the value for themaxZoomproperty- See Also:
-