Class ResizeRequest
java.lang.Object
bibliothek.gui.dock.facile.station.split.ResizeRequest
Represents the mismatch in size that some node has.
- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionResizeRequest(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 TypeMethodDescriptiondoubleGets the mismatch in height this request represents.doubleGets the mismatch in width this request represents.intGets the fraction of the mismatch the parent of the element that issued this request should provide.intGets the fraction of the mismatch the parent of the element that issued this request should provide.
-
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 widthdeltaHeight- 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 widthdeltaHeight- the amount of space that is missing in heightfractionWidth- 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
-