小编hoh*_*uli的帖子

如何在JavaFX 9中的TableView中查找可见行的索引

如何在JavaFX 9的TableView中获取可见行的索引?在JavaFX 8中,我可以执行以下操作:

  // --- The offending imports in Java 9
  // import com.sun.javafx.scene.control.skin.TableViewSkin;
  // import com.sun.javafx.scene.control.skin.VirtualFlow;

  /**
   * This is a total hack. We need it as scrollTo jumps the selected
   * row to the top of the table. Jarring if the row is already 
   * visible. As a workaround, we only scroll if the row isn't already
   * visible
   *
   * @return A 2 element ray with the start and end index of visible rows
   */
  public int[] …
Run Code Online (Sandbox Code Playgroud)

java java-9 javafx-9

2
推荐指数
1
解决办法
1618
查看次数

标签 统计

java ×1

java-9 ×1

javafx-9 ×1