Class ResizePolicy

    • Constructor Detail

      • ResizePolicy

        public ResizePolicy()
    • Method Detail

      • applySize

        protected void applySize​(double dw,
                                 double dh)
        Apply the new size to the host.
        Parameters:
        dw - The width delta.
        dh - The height delta.
      • computeApplicableDelta

        protected Dimension computeApplicableDelta​(double dw,
                                                   double dh)
        Computes the applicable delta from the given delta width and delta height values, i.e. respecting the part's minimum size.
        Parameters:
        dw - The width delta.
        dh - The height delta.
        Returns:
        A Dimension containing the applicable delta based on the given values.
      • getDeltaHeight

        public double getDeltaHeight()
        Returns the delta height of the resize operation that is used by this policy.
        Returns:
        The delta height of the resize operation that is used by this policy.
      • getDeltaWidth

        public double getDeltaWidth()
        Returns the delta width of the resize operation that is used by this policy.
        Returns:
        The delta width of the resize operation that is used by this policy.
      • isContentResizable

        protected boolean isContentResizable()
        Returns whether the content part supports a content resize operation.
        Returns:
        true if content resize is supported, false otherwise.
      • resize

        public void resize​(double finalDw,
                           double finalDh)
        Resizes the host by the given delta width and delta height.
        Parameters:
        finalDw - The delta width.
        finalDh - The delta height.
      • updateResizeOperation

        protected void updateResizeOperation​(double intendedDeltaWidth,
                                             double intendedDeltaHeight)
        Computes the applicable delta width and height from the given intended delta values and updates the operation accordingly.
        Parameters:
        intendedDeltaWidth - The intended width delta.
        intendedDeltaHeight - The intended height delta.