Spec-Zone .ru
спецификации, руководства, описания, API
|
public class RowConstraints extends ConstraintsBase
GridPane
. Если объект RowConstraints будет добавлен для строки в gridpane, то gridpane будет использовать те ограничительные значения, вычисляя height строки и расположение. Например, чтобы создать GridPane с 10 строками 50 высоких пикселей:
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()
The maximum height for the row.
|
double |
getMinHeight()
The minimum height for the row.
|
double |
getPercentHeight()
The height percentage of the row.
|
double |
getPrefHeight()
The preferred height for the row.
|
VPos |
getValignment()
The vertical alignment for the row.
|
Приоритет |
getVgrow()
The vertical grow priority for the row.
|
boolean |
isFillHeight()
The vertical fill policy for the row.
|
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)
The vertical fill policy for the row.
|
void |
setMaxHeight(double value)
The maximum height for the row.
|
void |
setMinHeight(double value)
The minimum height for the row.
|
void |
setPercentHeight(double value)
The height percentage of the row.
|
void |
setPrefHeight(double value)
The preferred height for the row.
|
void |
setValignment(VPos value)
The vertical alignment for the row.
|
void |
setVgrow(Priority value)
The vertical grow priority for the row.
|
java.lang.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
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)
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)
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)
getPercentHeight()
, setPercentHeight(double)
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)
getValignment()
, setValignment(VPos)
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)
public java.lang.String toString()
RowConstraints
object.toString
in class java.lang.Object
RowConstraints
object.Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. Use is subject to