类 ScalableContentPane

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.BooleanProperty
     
    final javafx.beans.property.BooleanProperty
     
    javafx.beans.property.DoubleProperty
     
    javafx.beans.property.DoubleProperty
     
    javafx.beans.property.DoubleProperty
     
    javafx.beans.property.DoubleProperty
     
    final 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 boolean
     
    private boolean
     
    private final javafx.beans.property.Property<javafx.scene.Node>
     
    private double
     
    private javafx.scene.transform.Scale
     
    private double
     
    private final javafx.beans.property.BooleanProperty
     
    private final javafx.beans.property.BooleanProperty
     
    private boolean
     
    private final javafx.beans.property.DoubleProperty
     
    private final javafx.beans.property.DoubleProperty
     
    private final javafx.beans.property.DoubleProperty
     
    private final javafx.beans.property.DoubleProperty
     
    private 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 double
    computeMinHeight(double d)
     
    protected double
    computeMinWidth(double d)
     
    protected double
     
    protected double
    computePrefWidth(double d)
     
    private void
     
    javafx.beans.property.Property<javafx.scene.Node>
    Returns the content pane property.
    final javafx.beans.property.BooleanProperty
     
    final javafx.beans.property.BooleanProperty
     
    javafx.scene.Node
     
    final javafx.scene.transform.Scale
    Returns the content scale transform.
    double
    获取maxScaleX属性的值。
    double
    获取maxScaleY属性的值。
    double
    获取minScaleX属性的值。
    double
    获取minScaleY属性的值。
    获取scaleBehavior属性的值。
    private void
     
    boolean
    Defines whether to keep aspect ration when scaling content.
    boolean
    Indicates whether content is automatically scaled.
    boolean
    获取fitToHeight属性的值。
    boolean
    获取fitToWidth属性的值。
    protected void
     
    javafx.beans.property.DoubleProperty
     
    javafx.beans.property.DoubleProperty
     
    javafx.beans.property.DoubleProperty
     
    javafx.beans.property.DoubleProperty
     
    void
    Requests scale computation.
    void
    Resets the scale that is applied to the content node.
    final javafx.beans.property.ObjectProperty<ScaleBehavior>
     
    void
    setAspectScale(boolean aspectScale)
    Defines whether to keep aspect ration of the content.
    void
    setAutoRescale(boolean autoRescale)
    Defines whether to automatically rescale content.
    final void
    setContent(javafx.scene.Node content)
    Defines the content pane of this scalable pane.
    void
    setFitToHeight(boolean value)
    设置fitToHeight属性的值。
    void
    setFitToWidth(boolean value)
    设置fitToWidth属性的值。
    void
    setMaxScaleX(double s)
    设置maxScaleX属性的值。
    void
    setMaxScaleY(double s)
    设置maxScaleY属性的值。
    void
    setMinScaleX(double s)
    设置minScaleX属性的值。
    void
    setMinScaleY(double s)
    设置minScaleY属性的值。
    void
    设置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
  • 属性详细资料

  • 字段详细资料

    • 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

      private final javafx.beans.property.ObjectProperty<ScaleBehavior> 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.
      返回:
      true if keeping aspect ratio of the content; false otherwise
    • 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.
      返回:
      true if content is automatically scaled; false otherwise
    • 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

      public final javafx.beans.property.ObjectProperty<ScaleBehavior> scaleBehaviorProperty()
      返回:
      scaleBehavior 属性
      另请参阅:
    • setScaleBehavior

      public void setScaleBehavior(ScaleBehavior behavior)
      设置scaleBehavior属性的值。
      属性说明:
      参数:
      behavior - scaleBehavior 属性的值
      另请参阅:
    • getScaleBehavior

      public ScaleBehavior getScaleBehavior()
      获取scaleBehavior属性的值。
      属性说明:
      返回:
      scaleBehavior 属性的值
      另请参阅: