Top Inners Fields Constructors Methods
impl.org.controlsfx.skin

public Class GridViewSkin<T>

extends VirtualContainerBase<GridView<T>, GridRow<T>>
Class Inheritance
Imports
javafx.collections.ListChangeListener, .ObservableList, .WeakListChangeListener, javafx.scene.control.skin.VirtualContainerBase, .VirtualFlow, org.controlsfx.control.GridView

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
GridViewSkin.GridVirtualFlow

Custom VirtualFlow to grant access to protected methods.

Field Summary

Modifier and TypeField and Description
private VirtualFlow<GridRow<T>>
private final ListChangeListener<T>
private final WeakListChangeListener<T>

Constructor Summary

AccessConstructor and Description
public
GridViewSkin(GridView<T> control)

Method Summary

Modifier and TypeMethod and Description
protected double

Returns:

Computed width of a cell
computeCellWidth
()

Returns the width of a cell

public int

Returns:

Max cell number per row
computeMaxCellsInRow
()

Returns the max number of cell per row

protected double
computeMinHeight(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

protected double

Returns:

Computed width of a row
computeRowWidth
()

Returns the width of a row (should be GridView.width - GridView.Scrollbar.width)

private GridRow<T>
protected VirtualFlow<GridRow<T>>
createVirtualFlow()

Overrides javafx.scene.control.skin.VirtualContainerBase.createVirtualFlow.

Create the virtualized container that handles the layout and scrolling of all the cells.

private GridViewSkin<T>.GridVirtualFlow
public int

Returns:

GridView row count
getItemCount
()

Implements abstract javafx.scene.control.skin.VirtualContainerBase.getItemCount.

Returns the number of row needed to display the whole set of cells

protected void
layoutChildren(double x, double y, double w, double h)

Overrides javafx.scene.control.skin.VirtualContainerBase.layoutChildren.

Called during the layout pass of the scenegraph.

public void
protected void
updateItemCount()

Implements abstract javafx.scene.control.skin.VirtualContainerBase.updateItemCount.

This method is called when it is possible that the item count has changed (i.e. scrolling has occurred, the control has resized, etc).

protected void
updateRows(int rowCount)

Inherited from javafx.scene.control.skin.VirtualContainerBase:
disposegetVirtualFlowmarkItemCountDirty

Field Detail

flowback to summary
private VirtualFlow<GridRow<T>> flow

Hides javafx.scene.control.skin.VirtualContainerBase.flow.

gridViewItemsListenerback to summary
private final ListChangeListener<T> gridViewItemsListener
weakGridViewItemsListenerback to summary
private final WeakListChangeListener<T> weakGridViewItemsListener

Constructor Detail

GridViewSkinback to summary
public GridViewSkin(GridView<T> control)
Annotations
@SuppressWarnings:rawtypes

Method Detail

computeCellWidthback to summary
protected double computeCellWidth()

Returns the width of a cell

Returns:double

Computed width of a cell

computeMaxCellsInRowback to summary
public int computeMaxCellsInRow()

Returns the max number of cell per row

Returns:int

Max cell number per row

computeMinHeightback to summary
protected double computeMinHeight(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Doc from javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

Annotations
@Override
computeRowWidthback to summary
protected double computeRowWidth()

Returns the width of a row (should be GridView.width - GridView.Scrollbar.width)

Returns:double

Computed width of a row

createCellback to summary
private GridRow<T> createCell()
createVirtualFlowback to summary
protected VirtualFlow<GridRow<T>> createVirtualFlow()

Overrides javafx.scene.control.skin.VirtualContainerBase.createVirtualFlow.

Doc from javafx.scene.control.skin.VirtualContainerBase.createVirtualFlow.

Create the virtualized container that handles the layout and scrolling of all the cells. This enables skin subclasses to provide a custom VirtualFlow implementation. If not overridden, this method instantiates a default VirtualFlow instance.

Annotations
@Override
getFlowback to summary
private GridViewSkin<T>.GridVirtualFlow getFlow()
getItemCountback to summary
public int getItemCount()

Implements abstract javafx.scene.control.skin.VirtualContainerBase.getItemCount.

Returns the number of row needed to display the whole set of cells

Returns:int

GridView row count

Annotations
@Override
layoutChildrenback to summary
protected void layoutChildren(double x, double y, double w, double h)

Overrides javafx.scene.control.skin.VirtualContainerBase.layoutChildren.

Doc from javafx.scene.control.skin.VirtualContainerBase.layoutChildren.

Called during the layout pass of the scenegraph.

Annotations
@Override
updateGridViewItemsback to summary
public void updateGridViewItems()
updateItemCountback to summary
protected void updateItemCount()

Implements abstract javafx.scene.control.skin.VirtualContainerBase.updateItemCount.

Doc from javafx.scene.control.skin.VirtualContainerBase.updateItemCount.

This method is called when it is possible that the item count has changed (i.e. scrolling has occurred, the control has resized, etc). This method should recalculate the item count and store that for future use by the getItemCount method.

Annotations
@Override
updateRowsback to summary
protected void updateRows(int rowCount)
impl.org.controlsfx.skin back to summary

private Class GridViewSkin.GridVirtualFlow

extends VirtualFlow<GridRow<T>>
Class Inheritance

Custom VirtualFlow to grant access to protected methods.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
rebuildCells()

Overrides javafx.scene.control.skin.VirtualFlow.rebuildCells.

Informs the VirtualFlow that a layout pass should be done, and cell contents have changed.

public void
reconfigureCells()

Overrides javafx.scene.control.skin.VirtualFlow.reconfigureCells.

Informs the VirtualFlow that a layout pass should be done, and the cell contents have not changed.

public void
recreateCells()

Overrides javafx.scene.control.skin.VirtualFlow.recreateCells.

Informs the VirtualFlow that a layout pass should be done, and that the cell factory has changed.

Inherited from javafx.scene.control.skin.VirtualFlow:
addAllToPilecellCountPropertycellFactoryPropertycomputePrefHeightcomputePrefWidthfixedCellSizePropertygetAvailableCellgetCellgetCellCountgetCellFactorygetCellIndexgetCellsgetFirstVisibleCellgetFirstVisibleCellWithinViewportgetFixedCellSizegetHbargetLastVisibleCellgetLastVisibleCellWithinViewportgetPositiongetPrivateCellgetVbargetViewportLengthgetVisibleCellisPannableisVerticallayoutChildrenpannablePropertypositionPropertyrequestCellLayoutrequestLayoutresizeCellscrollPixelsscrollToscrollToscrollToBottomscrollToTopscrollToTopsetCellCountsetCellFactorysetCellIndexsetFixedCellSizesetHeightsetPannablesetPositionsetVerticalsetWidthverticalProperty

Constructor Detail

GridVirtualFlowback to summary
private GridVirtualFlow()

Method Detail

rebuildCellsback to summary
public void rebuildCells()

Overrides javafx.scene.control.skin.VirtualFlow.rebuildCells.

Doc from javafx.scene.control.skin.VirtualFlow.rebuildCells.

Informs the VirtualFlow that a layout pass should be done, and cell contents have changed. All cells are removed and then added properly in the viewport.

reconfigureCellsback to summary
public void reconfigureCells()

Overrides javafx.scene.control.skin.VirtualFlow.reconfigureCells.

Doc from javafx.scene.control.skin.VirtualFlow.reconfigureCells.

Informs the VirtualFlow that a layout pass should be done, and the cell contents have not changed. For example, this might be called from a TableView or ListView when a layout is needed and no cells have been added or removed.

recreateCellsback to summary
public void recreateCells()

Overrides javafx.scene.control.skin.VirtualFlow.recreateCells.

Doc from javafx.scene.control.skin.VirtualFlow.recreateCells.

Informs the VirtualFlow that a layout pass should be done, and that the cell factory has changed. All cells in the viewport are recreated with the new cell factory.