public class ScalableContentPane extends Region
| Type | Property and Description |
|---|---|
Property<Pane> |
content
Returns the content pane property.
|
BooleanProperty |
fitToHeight |
BooleanProperty |
fitToWidth |
DoubleProperty |
maxScaleX |
DoubleProperty |
maxScaleY |
DoubleProperty |
minScaleX |
DoubleProperty |
minScaleY |
ObjectProperty<ScaleBehavior> |
scaleBehavior |
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthimpl_traversalEngine, needsLayoutaccessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, impl_showMnemonics, impl_treeVisible, 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, visibleUSE_COMPUTED_SIZE, USE_PREF_SIZEBASELINE_OFFSET_SAME_AS_HEIGHT| Constructor and Description |
|---|
ScalableContentPane()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
computeMinHeight(double d) |
protected double |
computeMinWidth(double d) |
protected double |
computePrefHeight(double d) |
protected double |
computePrefWidth(double d) |
Property<Pane> |
contentProperty()
Returns the content pane property.
|
BooleanProperty |
fitToHeightProperty() |
BooleanProperty |
fitToWidthProperty() |
Pane |
getContent() |
Scale |
getContentScaleTransform()
Returns the content scale transform.
|
double |
getMaxScaleX()
Gets the value of the property maxScaleX.
|
double |
getMaxScaleY()
Gets the value of the property maxScaleY.
|
double |
getMinScaleX()
Gets the value of the property minScaleX.
|
double |
getMinScaleY()
Gets the value of the property minScaleY.
|
ScaleBehavior |
getScaleBehavior()
Gets the value of the property scaleBehavior.
|
boolean |
isAspectScale()
Defines whether to keep aspect ration when scaling content.
|
boolean |
isAutoRescale()
Indicates whether content is automatically scaled.
|
boolean |
isFitToHeight()
Gets the value of the property fitToHeight.
|
boolean |
isFitToWidth()
Gets the value of the property fitToWidth.
|
protected void |
layoutChildren() |
DoubleProperty |
maxScaleXProperty() |
DoubleProperty |
maxScaleYProperty() |
DoubleProperty |
minScaleXProperty() |
DoubleProperty |
minScaleYProperty() |
void |
requestScale() |
void |
resetScale() |
ObjectProperty<ScaleBehavior> |
scaleBehaviorProperty() |
void |
setAspectScale(boolean aspectScale)
Defines whether to keep aspect ration of the content.
|
void |
setAutoRescale(boolean autoRescale)
Defines whether to automatically rescale content.
|
void |
setContent(Pane contentPane)
Defines the content pane of this scalable pane.
|
void |
setFitToHeight(boolean value)
Sets the value of the property fitToHeight.
|
void |
setFitToWidth(boolean value)
Sets the value of the property fitToWidth.
|
void |
setMaxScaleX(double s)
Sets the value of the property maxScaleX.
|
void |
setMaxScaleY(double s)
Sets the value of the property maxScaleY.
|
void |
setMinScaleX(double s)
Sets the value of the property minScaleX.
|
void |
setMinScaleY(double s)
Sets the value of the property minScaleY.
|
void |
setScaleBehavior(ScaleBehavior behavior)
Sets the value of the property scaleBehavior.
|
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, insetsProperty, isCacheShape, isCenterShape, isResizable, 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, snapSize, snapSpace, snapToPixelProperty, widthPropertygetBaselineOffset, getChildren, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processCSS, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBoundsaccessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, 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, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_cssGetFocusTraversableInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, 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, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visiblePropertypublic Property<Pane> contentProperty
getContent(),
setContent(Pane)public DoubleProperty minScaleXProperty
getMinScaleX(),
setMinScaleX(double)public DoubleProperty minScaleYProperty
getMinScaleY(),
setMinScaleY(double)public DoubleProperty maxScaleXProperty
getMaxScaleX(),
setMaxScaleX(double)public DoubleProperty maxScaleYProperty
getMaxScaleY(),
setMaxScaleY(double)public final BooleanProperty fitToWidthProperty
isFitToWidth(),
setFitToWidth(boolean)public final BooleanProperty fitToHeightProperty
isFitToHeight(),
setFitToHeight(boolean)public final ObjectProperty<ScaleBehavior> scaleBehaviorProperty
public Pane getContent()
public final void setContent(Pane contentPane)
contentPane - pane to definepublic Property<Pane> contentProperty()
getContent(),
setContent(Pane)public final Scale getContentScaleTransform()
protected void layoutChildren()
layoutChildren in class Parentpublic void requestScale()
public void resetScale()
protected double computeMinWidth(double d)
computeMinWidth in class Regionprotected double computeMinHeight(double d)
computeMinHeight in class Regionprotected double computePrefWidth(double d)
computePrefWidth in class Regionprotected double computePrefHeight(double d)
computePrefHeight in class Regionpublic boolean isAspectScale()
true if keeping aspect ratio of the content;
false otherwisepublic void setAspectScale(boolean aspectScale)
aspectScale - the state to setpublic boolean isAutoRescale()
true if content is automatically scaled;
false otherwisepublic void setAutoRescale(boolean autoRescale)
autoRescale - the state to setpublic DoubleProperty minScaleXProperty()
getMinScaleX(),
setMinScaleX(double)public DoubleProperty minScaleYProperty()
getMinScaleY(),
setMinScaleY(double)public DoubleProperty maxScaleXProperty()
getMaxScaleX(),
setMaxScaleX(double)public DoubleProperty maxScaleYProperty()
getMaxScaleY(),
setMaxScaleY(double)public double getMinScaleX()
public double getMaxScaleX()
public double getMinScaleY()
public double getMaxScaleY()
public void setMinScaleX(double s)
public void setMaxScaleX(double s)
public void setMinScaleY(double s)
public void setMaxScaleY(double s)
public void setFitToWidth(boolean value)
public boolean isFitToWidth()
public final BooleanProperty fitToWidthProperty()
isFitToWidth(),
setFitToWidth(boolean)public void setFitToHeight(boolean value)
public final BooleanProperty fitToHeightProperty()
isFitToHeight(),
setFitToHeight(boolean)public boolean isFitToHeight()
public final ObjectProperty<ScaleBehavior> scaleBehaviorProperty()
public void setScaleBehavior(ScaleBehavior behavior)
public ScaleBehavior getScaleBehavior()