JavaFX
Logging Custom Controls
Logging.getCSSLogger().setLevel(sun.util.logging.PlatformLogger.Level.FINER);
TreeTableView
Hide Arrows
CSS Way:
/* Hide Arrow: not needed because the skin is adapted */ .tree-cell > .tree-disclosure-node > .arrow, .tree-table-row-cell > .tree-disclosure-node > .arrow { -fx-shape: null; -fx-background-color: transparent; }
Programmatic:
public class TappasTreeTableViewSkin<S> extends TreeTableViewSkin<S> { @Override public TreeTableRow<S> createCell() { TreeTableRow<S> cell; if (getSkinnable().getRowFactory() != null) { cell = getSkinnable().getRowFactory().call(getSkinnable()); } else { cell = new TreeTableRow<S>(); } } .. }
JavaFX 8 BUG: Virtualisierung bricht bei Verwendung eine TreeTableView.fixedCellSize>-1
Möglich Lösung:
private VirtualFlow<TreeTableCell<S, ?>> myFlow = new VirtualFlow<TreeTableCell<S, ?>>() { /* * */ protected void resizeCellSize(TreeTableCell<S, ?> cell) { super.resizeCellSize(cell); if (cell == null) return; double fixedCellSize = getSkinnable().getFixedCellSize(); boolean fixedCellSizeEnabled = fixedCellSize != -1; // possible bug fix by calling checkState with parameter false to set // TableRowSkinBase.isDirty to true and thus prevent from recreating // cells // if (fixedCellSizeEnabled) // ((TableRowSkinBase) cell.getSkin()).checkState(false); if (isVertical()) { double width = cell.getWidth(); cell.resize( width, fixedCellSizeEnabled ? fixedCellSize : cell.prefHeight(width)); } else { double height = cell.getHeight(); cell.resize( fixedCellSizeEnabled ? fixedCellSize : cell.prefWidth(height), height); } } };