javafx.scene.control.ListView.maxHeightProperty()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(175)

本文整理了Java中javafx.scene.control.ListView.maxHeightProperty()方法的一些代码示例,展示了ListView.maxHeightProperty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.maxHeightProperty()方法的具体详情如下:
包路径:javafx.scene.control.ListView
类名称:ListView
方法名:maxHeightProperty

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);

相关文章