Class ResizeRequest

java.lang.Object
bibliothek.gui.dock.facile.station.split.ResizeRequest

public class ResizeRequest extends Object
Represents the mismatch in size that some node has.
Author:
Benjamin Sigg
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResizeRequest(double deltaWidth, double deltaHeight)
    Creates a new size request with fraction-width/height set to 1.
    ResizeRequest(double deltaWidth, double deltaHeight, int fractionWidth, int fractionHeight)
    Creates a new size request.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Gets the mismatch in height this request represents.
    double
    Gets the mismatch in width this request represents.
    int
    Gets the fraction of the mismatch the parent of the element that issued this request should provide.
    int
    Gets the fraction of the mismatch the parent of the element that issued this request should provide.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ResizeRequest

      public ResizeRequest(double deltaWidth, double deltaHeight)
      Creates a new size request with fraction-width/height set to 1.
      Parameters:
      deltaWidth - the amount of space that is missing in width
      deltaHeight - the amount of space that is missing in height
    • ResizeRequest

      public ResizeRequest(double deltaWidth, double deltaHeight, int fractionWidth, int fractionHeight)
      Creates a new size request.
      Parameters:
      deltaWidth - the amount of space that is missing in width
      deltaHeight - the amount of space that is missing in height
      fractionWidth - the fraction of space the parent of the asking node should provide. If this value is set to x, then the parent would grant 1/x of the request. -1 indicates that the width should be ignored.
      fractionHeight - the fraction of space the parent of the asking node should provide. If this value is set to x, then the parent would grant 1/x of the request. -1 indicates that the height should be ignored.
  • Method Details

    • getDeltaWidth

      public double getDeltaWidth()
      Gets the mismatch in width this request represents.
      Returns:
      the mismatch
    • getDeltaHeight

      public double getDeltaHeight()
      Gets the mismatch in height this request represents.
      Returns:
      the mismatch
    • getFractionWidth

      public int getFractionWidth()
      Gets the fraction of the mismatch the parent of the element that issued this request should provide. A value of -1 indicates that this request does not care about the width.
      Returns:
      the fraction
    • getFractionHeight

      public int getFractionHeight()
      Gets the fraction of the mismatch the parent of the element that issued this request should provide. A value of -1 indicates that this request does not care about the height.
      Returns:
      the fraction