public class RowConstraints extends ConstraintsBase
GridPane
.
If a RowConstraints object is added for a row in a gridpane, the gridpane
will use those constraint values when computing the row's height and layout.
For example, to create a GridPane with 10 rows 50 pixels tall:
GridPane gridpane = new GridPane();
for (int i = 0; i < 10; i++) {
RowConstraints row = new RowConstraints(50);
gridpane.getRowConstraints().add(row);
}
Or, to create a GridPane where rows take 25%, 50%, 25% of its width:
GridPane gridpane = new GridPane();
RowConstraints row1 = new RowConstraints();
row1.setPercentWidth(25);
RowConstraints row2 = new RowConstraints();
row2.setPercentWidth(50);
RowConstraints row3 = new RowConstraints();
row3.setPercentWidth(25);
gridpane.getRowConstraints().addAll(row1,row2,row3);
Note that adding an empty RowConstraints object has the effect of not setting
any constraints, leaving the GridPane to compute the row's layout based
solely on its content's size preferences and constraints.Type  Property and Description 

BooleanProperty 
fillHeight
The vertical fill policy for the row.

DoubleProperty 
maxHeight
The maximum height for the row.

DoubleProperty 
minHeight
The minimum height for the row.

DoubleProperty 
percentHeight
The height percentage of the row.

DoubleProperty 
prefHeight
The preferred height for the row.

ObjectProperty<VPos> 
valignment
The vertical alignment for the row.

ObjectProperty<Priority> 
vgrow
The vertical grow priority for the row.

CONSTRAIN_TO_PREF
Constructor and Description 

RowConstraints()
Creates a row constraints object with no properties set.

RowConstraints(double height)
Creates a row constraint object with a fixed height.

RowConstraints(double minHeight,
double prefHeight,
double maxHeight)
Creates a row constraint object with a fixed size range.

RowConstraints(double minHeight,
double prefHeight,
double maxHeight,
Priority vgrow,
VPos valignment,
boolean fillHeight)
Creates a row constraint object with a fixed size range, vertical
grow priority, vertical alignment, and vertical fill behavior.

Modifier and Type  Method and Description 

BooleanProperty 
fillHeightProperty()
The vertical fill policy for the row.

double 
getMaxHeight()
Gets the value of the property maxHeight.

double 
getMinHeight()
Gets the value of the property minHeight.

double 
getPercentHeight()
Gets the value of the property percentHeight.

double 
getPrefHeight()
Gets the value of the property prefHeight.

VPos 
getValignment()
Gets the value of the property valignment.

Priority 
getVgrow()
Gets the value of the property vgrow.

boolean 
isFillHeight()
Gets the value of the property fillHeight.

DoubleProperty 
maxHeightProperty()
The maximum height for the row.

DoubleProperty 
minHeightProperty()
The minimum height for the row.

DoubleProperty 
percentHeightProperty()
The height percentage of the row.

DoubleProperty 
prefHeightProperty()
The preferred height for the row.

void 
setFillHeight(boolean value)
Sets the value of the property fillHeight.

void 
setMaxHeight(double value)
Sets the value of the property maxHeight.

void 
setMinHeight(double value)
Sets the value of the property minHeight.

void 
setPercentHeight(double value)
Sets the value of the property percentHeight.

void 
setPrefHeight(double value)
Sets the value of the property prefHeight.

void 
setValignment(VPos value)
Sets the value of the property valignment.

void 
setVgrow(Priority value)
Sets the value of the property vgrow.

String 
toString()
Returns a string representation of this
RowConstraints object. 
ObjectProperty<VPos> 
valignmentProperty()
The vertical alignment for the row.

ObjectProperty<Priority> 
vgrowProperty()
The vertical grow priority for the row.

requestLayout
public final DoubleProperty minHeightProperty
The default value is USE_COMPUTED_SIZE, which means the minimum height will be computed to be the largest minimum height of the row's content.
getMinHeight()
,
setMinHeight(double)
public final DoubleProperty prefHeightProperty
The default value is USE_COMPUTED_SIZE, which means the preferred height will be computed to be the largest preferred height of the row's content.
getPrefHeight()
,
setPrefHeight(double)
public final DoubleProperty maxHeightProperty
The default value is USE_COMPUTED_SIZE, which means the maximum height will be computed to be the smallest maximum height of the row's content.
getMaxHeight()
,
setMaxHeight(double)
public final DoubleProperty percentHeightProperty
getPercentHeight()
,
setPercentHeight(double)
public final ObjectProperty<Priority> vgrowProperty
This default value is null, which means that the row's grow priority will be derived from largest grow priority set on a content node.
getVgrow()
,
setVgrow(Priority)
public final ObjectProperty<VPos> valignmentProperty
getValignment()
,
setValignment(VPos)
public final BooleanProperty fillHeightProperty
The default value is true.
isFillHeight()
,
setFillHeight(boolean)
public RowConstraints()
public RowConstraints(double height)
height
 the height of the rowpublic RowConstraints(double minHeight, double prefHeight, double maxHeight)
public final void setMinHeight(double value)
The default value is USE_COMPUTED_SIZE, which means the minimum height will be computed to be the largest minimum height of the row's content.
public final double getMinHeight()
The default value is USE_COMPUTED_SIZE, which means the minimum height will be computed to be the largest minimum height of the row's content.
public final DoubleProperty minHeightProperty()
The default value is USE_COMPUTED_SIZE, which means the minimum height will be computed to be the largest minimum height of the row's content.
getMinHeight()
,
setMinHeight(double)
public final void setPrefHeight(double value)
The default value is USE_COMPUTED_SIZE, which means the preferred height will be computed to be the largest preferred height of the row's content.
public final double getPrefHeight()
The default value is USE_COMPUTED_SIZE, which means the preferred height will be computed to be the largest preferred height of the row's content.
public final DoubleProperty prefHeightProperty()
The default value is USE_COMPUTED_SIZE, which means the preferred height will be computed to be the largest preferred height of the row's content.
getPrefHeight()
,
setPrefHeight(double)
public final void setMaxHeight(double value)
The default value is USE_COMPUTED_SIZE, which means the maximum height will be computed to be the smallest maximum height of the row's content.
public final double getMaxHeight()
The default value is USE_COMPUTED_SIZE, which means the maximum height will be computed to be the smallest maximum height of the row's content.
public final DoubleProperty maxHeightProperty()
The default value is USE_COMPUTED_SIZE, which means the maximum height will be computed to be the smallest maximum height of the row's content.
getMaxHeight()
,
setMaxHeight(double)
public final void setPercentHeight(double value)
public final double getPercentHeight()
public final DoubleProperty percentHeightProperty()
getPercentHeight()
,
setPercentHeight(double)
public final void setVgrow(Priority value)
This default value is null, which means that the row's grow priority will be derived from largest grow priority set on a content node.
public final Priority getVgrow()
This default value is null, which means that the row's grow priority will be derived from largest grow priority set on a content node.
public final ObjectProperty<Priority> vgrowProperty()
This default value is null, which means that the row's grow priority will be derived from largest grow priority set on a content node.
getVgrow()
,
setVgrow(Priority)
public final void setValignment(VPos value)
public final VPos getValignment()
public final ObjectProperty<VPos> valignmentProperty()
getValignment()
,
setValignment(VPos)
public final void setFillHeight(boolean value)
The default value is true.
public final boolean isFillHeight()
The default value is true.
public final BooleanProperty fillHeightProperty()
The default value is true.
isFillHeight()
,
setFillHeight(boolean)
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.