java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
com.tlcsdm.core.javafx.control.ScalableContentPane
- 所有已实现的接口:
javafx.css.Styleable,javafx.event.EventTarget
@DefaultProperty("content")
public class ScalableContentPane
extends javafx.scene.layout.Region
Scales content to always fit in the bounds of this pane. Useful for workflows
with lots of windows.
- 作者:
- unknowIfGuestInDream
-
属性概要
属性类型属性说明javafx.beans.property.Property<javafx.scene.Node> Returns the content pane property.final javafx.beans.property.BooleanPropertyfinal javafx.beans.property.BooleanPropertyjavafx.beans.property.DoublePropertyjavafx.beans.property.DoublePropertyjavafx.beans.property.DoublePropertyjavafx.beans.property.DoublePropertyfinal javafx.beans.property.ObjectProperty<ScaleBehavior> 从类继承的属性 javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width从类继承的属性 javafx.scene.Parent
needsLayout从类继承的属性 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 -
字段概要
字段修饰符和类型字段说明private booleanprivate booleanprivate final javafx.beans.property.Property<javafx.scene.Node> private doubleprivate javafx.scene.transform.Scaleprivate doubleprivate final javafx.beans.property.BooleanPropertyprivate final javafx.beans.property.BooleanPropertyprivate booleanprivate final javafx.beans.property.DoublePropertyprivate final javafx.beans.property.DoublePropertyprivate final javafx.beans.property.DoublePropertyprivate final javafx.beans.property.DoublePropertyprivate final javafx.beans.property.ObjectProperty<ScaleBehavior> 从类继承的字段 javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE从类继承的字段 javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
构造器概要
构造器构造器说明Constructor.ScalableContentPane(javafx.scene.Node content) Creates a new instance with the specified content node. -
方法概要
修饰符和类型方法说明protected doublecomputeMinHeight(double d) protected doublecomputeMinWidth(double d) protected doublecomputePrefHeight(double d) protected doublecomputePrefWidth(double d) private voidjavafx.beans.property.Property<javafx.scene.Node> Returns the content pane property.final javafx.beans.property.BooleanPropertyfinal javafx.beans.property.BooleanPropertyjavafx.scene.Nodefinal javafx.scene.transform.ScaleReturns the content scale transform.double获取maxScaleX属性的值。double获取maxScaleY属性的值。double获取minScaleX属性的值。double获取minScaleY属性的值。获取scaleBehavior属性的值。private voidbooleanDefines whether to keep aspect ration when scaling content.booleanIndicates whether content is automatically scaled.boolean获取fitToHeight属性的值。boolean获取fitToWidth属性的值。protected voidjavafx.beans.property.DoublePropertyjavafx.beans.property.DoublePropertyjavafx.beans.property.DoublePropertyjavafx.beans.property.DoublePropertyvoidRequests scale computation.voidResets the scale that is applied to the content node.final javafx.beans.property.ObjectProperty<ScaleBehavior> voidsetAspectScale(boolean aspectScale) Defines whether to keep aspect ration of the content.voidsetAutoRescale(boolean autoRescale) Defines whether to automatically rescale content.final voidsetContent(javafx.scene.Node content) Defines the content pane of this scalable pane.voidsetFitToHeight(boolean value) 设置fitToHeight属性的值。voidsetFitToWidth(boolean value) 设置fitToWidth属性的值。voidsetMaxScaleX(double s) 设置maxScaleX属性的值。voidsetMaxScaleY(double s) 设置maxScaleY属性的值。voidsetMinScaleX(double s) 设置minScaleX属性的值。voidsetMinScaleY(double s) 设置minScaleY属性的值。voidsetScaleBehavior(ScaleBehavior behavior) 设置scaleBehavior属性的值。从类继承的方法 javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, 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, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty从类继承的方法 javafx.scene.Parent
getBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBounds从类继承的方法 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, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, 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从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 javafx.css.Styleable
getStyleableNode
-
属性详细资料
-
content
public javafx.beans.property.Property<javafx.scene.Node> contentPropertyReturns the content pane property.- 另请参阅:
-
minScaleX
public javafx.beans.property.DoubleProperty minScaleXProperty- 另请参阅:
-
minScaleY
public javafx.beans.property.DoubleProperty minScaleYProperty- 另请参阅:
-
maxScaleX
public javafx.beans.property.DoubleProperty maxScaleXProperty- 另请参阅:
-
maxScaleY
public javafx.beans.property.DoubleProperty maxScaleYProperty- 另请参阅:
-
fitToWidth
public final javafx.beans.property.BooleanProperty fitToWidthProperty- 另请参阅:
-
fitToHeight
public final javafx.beans.property.BooleanProperty fitToHeightProperty- 另请参阅:
-
scaleBehavior
- 另请参阅:
-
-
字段详细资料
-
contentScaleTransform
private javafx.scene.transform.Scale contentScaleTransform -
contentPaneProperty
private final javafx.beans.property.Property<javafx.scene.Node> contentPaneProperty -
contentScaleWidth
private double contentScaleWidth -
contentScaleHeight
private double contentScaleHeight -
aspectScale
private boolean aspectScale -
autoRescale
private boolean autoRescale -
minScaleXProperty
private final javafx.beans.property.DoubleProperty minScaleXProperty -
maxScaleXProperty
private final javafx.beans.property.DoubleProperty maxScaleXProperty -
minScaleYProperty
private final javafx.beans.property.DoubleProperty minScaleYProperty -
maxScaleYProperty
private final javafx.beans.property.DoubleProperty maxScaleYProperty -
fitToWidthProperty
private final javafx.beans.property.BooleanProperty fitToWidthProperty -
fitToHeightProperty
private final javafx.beans.property.BooleanProperty fitToHeightProperty -
scaleBehavior
-
manualReset
private boolean manualReset
-
-
构造器详细资料
-
ScalableContentPane
public ScalableContentPane()Constructor. -
ScalableContentPane
public ScalableContentPane(javafx.scene.Node content) Creates a new instance with the specified content node.- 参数:
content- content node to scale
-
-
方法详细资料
-
getContent
public javafx.scene.Node getContent()- 返回:
- the content pane
-
setContent
public final void setContent(javafx.scene.Node content) Defines the content pane of this scalable pane.- 参数:
content- content node to scale
-
contentProperty
public javafx.beans.property.Property<javafx.scene.Node> contentProperty()Returns the content pane property.- 返回:
- the content pane property
- 另请参阅:
-
getContentScaleTransform
public final javafx.scene.transform.Scale getContentScaleTransform()Returns the content scale transform.- 返回:
- the content scale transform
-
layoutChildren
protected void layoutChildren()- 覆盖:
layoutChildren在类中javafx.scene.Parent
-
computeScale
private void computeScale() -
requestScale
public void requestScale()Requests scale computation. Note: Usually, this will be performed automatically. If calling this method is necessary, it is likely that you found a bug that should probably be reported. -
resetScale
public void resetScale()Resets the scale that is applied to the content node. -
computeMinWidth
protected double computeMinWidth(double d) - 覆盖:
computeMinWidth在类中javafx.scene.layout.Region
-
computeMinHeight
protected double computeMinHeight(double d) - 覆盖:
computeMinHeight在类中javafx.scene.layout.Region
-
computePrefWidth
protected double computePrefWidth(double d) - 覆盖:
computePrefWidth在类中javafx.scene.layout.Region
-
computePrefHeight
protected double computePrefHeight(double d) - 覆盖:
computePrefHeight在类中javafx.scene.layout.Region
-
initContentPaneListener
private void initContentPaneListener() -
isAspectScale
public boolean isAspectScale()Defines whether to keep aspect ration when scaling content.- 返回:
trueif keeping aspect ratio of the content;falseotherwise
-
setAspectScale
public void setAspectScale(boolean aspectScale) Defines whether to keep aspect ration of the content.- 参数:
aspectScale- the state to set
-
isAutoRescale
public boolean isAutoRescale()Indicates whether content is automatically scaled.- 返回:
trueif content is automatically scaled;falseotherwise
-
setAutoRescale
public void setAutoRescale(boolean autoRescale) Defines whether to automatically rescale content.- 参数:
autoRescale- the state to set
-
minScaleXProperty
public javafx.beans.property.DoubleProperty minScaleXProperty()- 返回:
minScaleX属性- 另请参阅:
-
minScaleYProperty
public javafx.beans.property.DoubleProperty minScaleYProperty()- 返回:
minScaleY属性- 另请参阅:
-
maxScaleXProperty
public javafx.beans.property.DoubleProperty maxScaleXProperty()- 返回:
maxScaleX属性- 另请参阅:
-
maxScaleYProperty
public javafx.beans.property.DoubleProperty maxScaleYProperty()- 返回:
maxScaleY属性- 另请参阅:
-
getMinScaleX
public double getMinScaleX()获取minScaleX属性的值。- 属性说明:
- 返回:
minScaleX属性的值- 另请参阅:
-
getMaxScaleX
public double getMaxScaleX()获取maxScaleX属性的值。- 属性说明:
- 返回:
maxScaleX属性的值- 另请参阅:
-
getMinScaleY
public double getMinScaleY()获取minScaleY属性的值。- 属性说明:
- 返回:
minScaleY属性的值- 另请参阅:
-
getMaxScaleY
public double getMaxScaleY()获取maxScaleY属性的值。- 属性说明:
- 返回:
maxScaleY属性的值- 另请参阅:
-
setMinScaleX
public void setMinScaleX(double s) 设置minScaleX属性的值。- 属性说明:
- 参数:
s-minScaleX属性的值- 另请参阅:
-
setMaxScaleX
public void setMaxScaleX(double s) 设置maxScaleX属性的值。- 属性说明:
- 参数:
s-maxScaleX属性的值- 另请参阅:
-
setMinScaleY
public void setMinScaleY(double s) 设置minScaleY属性的值。- 属性说明:
- 参数:
s-minScaleY属性的值- 另请参阅:
-
setMaxScaleY
public void setMaxScaleY(double s) 设置maxScaleY属性的值。- 属性说明:
- 参数:
s-maxScaleY属性的值- 另请参阅:
-
setFitToWidth
public void setFitToWidth(boolean value) 设置fitToWidth属性的值。- 属性说明:
- 参数:
value-fitToWidth属性的值- 另请参阅:
-
isFitToWidth
public boolean isFitToWidth()获取fitToWidth属性的值。- 属性说明:
- 返回:
fitToWidth属性的值- 另请参阅:
-
fitToWidthProperty
public final javafx.beans.property.BooleanProperty fitToWidthProperty()- 返回:
fitToWidth属性- 另请参阅:
-
setFitToHeight
public void setFitToHeight(boolean value) 设置fitToHeight属性的值。- 属性说明:
- 参数:
value-fitToHeight属性的值- 另请参阅:
-
fitToHeightProperty
public final javafx.beans.property.BooleanProperty fitToHeightProperty()- 返回:
fitToHeight属性- 另请参阅:
-
isFitToHeight
public boolean isFitToHeight()获取fitToHeight属性的值。- 属性说明:
- 返回:
fitToHeight属性的值- 另请参阅:
-
scaleBehaviorProperty
- 返回:
scaleBehavior属性- 另请参阅:
-
setScaleBehavior
设置scaleBehavior属性的值。- 属性说明:
- 参数:
behavior-scaleBehavior属性的值- 另请参阅:
-
getScaleBehavior
获取scaleBehavior属性的值。- 属性说明:
- 返回:
scaleBehavior属性的值- 另请参阅:
-