本文整理了Java中javafx.scene.control.ListView.maxHeightProperty()
方法的一些代码示例,展示了ListView.maxHeightProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.maxHeightProperty()
方法的具体详情如下:
包路径:javafx.scene.control.ListView
类名称:ListView
方法名:maxHeightProperty
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
@Override
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
final int itemsCount = getSkinnable().getItems().size();
if (getSkinnable().maxHeightProperty().isBound() || itemsCount <= 0) {
return super.computePrefHeight(width, topInset, rightInset, bottomInset, leftInset);
}
final double fixedCellSize = getSkinnable().getFixedCellSize();
double computedHeight = fixedCellSize != Region.USE_COMPUTED_SIZE ?
fixedCellSize * itemsCount + snapVerticalInsets() : estimateHeight();
double height = super.computePrefHeight(width, topInset, rightInset, bottomInset, leftInset);
if (height > computedHeight) {
height = computedHeight;
}
if (getSkinnable().getMaxHeight() > 0 && computedHeight > getSkinnable().getMaxHeight()) {
return getSkinnable().getMaxHeight();
}
return height;
}
代码示例来源:origin: jfoenixadmin/JFoenix
yearsListView.maxHeightProperty().bind(contentPlaceHolder.heightProperty());
contentPlaceHolder.getChildren().setAll(calendarPlaceHolder, yearsListView);
getChildren().add(contentPlaceHolder);
代码示例来源:origin: com.jfoenix/jfoenix
@Override
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
final int itemsCount = getSkinnable().getItems().size();
if (getSkinnable().maxHeightProperty().isBound() || itemsCount <= 0) {
return super.computePrefHeight(width, topInset, rightInset, bottomInset, leftInset);
}
final double fixedCellSize = getSkinnable().getFixedCellSize();
double computedHeight = fixedCellSize != Region.USE_COMPUTED_SIZE ?
fixedCellSize * itemsCount + snapVerticalInsets() : estimateHeight();
double height = super.computePrefHeight(width, topInset, rightInset, bottomInset, leftInset);
if (height > computedHeight) {
height = computedHeight;
}
if (getSkinnable().getMaxHeight() > 0 && computedHeight > getSkinnable().getMaxHeight()) {
return getSkinnable().getMaxHeight();
}
return height;
}
代码示例来源:origin: com.jfoenix/jfoenix
yearsListView.maxHeightProperty().bind(contentPlaceHolder.heightProperty());
contentPlaceHolder.getChildren().setAll(calendarPlaceHolder, yearsListView);
getChildren().add(contentPlaceHolder);
内容来源于网络,如有侵权,请联系作者删除!