Top Description Fields Constructors Methods
org.fxmisc.flowless

pack-priv abstract Class CellWrapper<T, N extends Node, C extends Cell<T, N>>

extends Object
implements Cell<T, N extends Node>
Class Inheritance
All Implemented Interfaces
org.fxmisc.flowless.Cell
Imports
java.util.function.Consumer, .IntConsumer, javafx.scene.Node

Factory class for wrapping a Cell and running additional code before/after specific methods

Field Summary

Modifier and TypeField and Description
private final C

Constructor Summary

AccessConstructor and Description
public
CellWrapper(C delegate)

Method Summary

Modifier and TypeMethod and Description
public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C>
afterDispose(C cell, Runnable action)

public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C>
afterReset(C cell, Runnable action)

public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C>
afterUpdateIndex(C cell, IntConsumer action)

public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C>
afterUpdateItem(C cell, Consumer<? super T> action)

public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C>
beforeDispose(C cell, Runnable action)

public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C>
beforeReset(C cell, Runnable action)

public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C>
public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C>
beforeUpdateItem(C cell, Consumer<? super T> action)

public void
dispose()

Overrides default org.fxmisc.flowless.Cell.dispose.

Called when this cell is no longer going to be used at all.

public C
public N
public boolean
isReusable()

Overrides default org.fxmisc.flowless.Cell.isReusable.

Indicates whether this cell can be reused to display different items.

public void
reset()

Overrides default org.fxmisc.flowless.Cell.reset.

Called when this cell is no longer used to display its item.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
updateIndex(int index)

Overrides default org.fxmisc.flowless.Cell.updateIndex.

Called to update index of a visible cell.

public void
updateItem(T item)

Overrides default org.fxmisc.flowless.Cell.updateItem.

If this cell is reusable (as indicated by isReusable()), this method is called to display a different item.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

delegateback to summary
private final C delegate

Constructor Detail

CellWrapperback to summary
public CellWrapper(C delegate)

Method Detail

afterDisposeback to summary
public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C> afterDispose(C cell, Runnable action)
afterResetback to summary
public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C> afterReset(C cell, Runnable action)
afterUpdateIndexback to summary
public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C> afterUpdateIndex(C cell, IntConsumer action)
afterUpdateItemback to summary
public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C> afterUpdateItem(C cell, Consumer<? super T> action)
beforeDisposeback to summary
public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C> beforeDispose(C cell, Runnable action)
beforeResetback to summary
public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C> beforeReset(C cell, Runnable action)
beforeUpdateIndexback to summary
public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C> beforeUpdateIndex(C cell, IntConsumer action)
beforeUpdateItemback to summary
public static <T, N extends Node, C extends Cell<T, N>> CellWrapper<T, N, C> beforeUpdateItem(C cell, Consumer<? super T> action)
disposeback to summary
public void dispose()

Overrides default org.fxmisc.flowless.Cell.dispose.

Doc from org.fxmisc.flowless.Cell.dispose.

Called when this cell is no longer going to be used at all. reset() will have been called before this method is invoked.

Default implementation does nothing.

Annotations
@Override
getDelegateback to summary
public C getDelegate()
getNodeback to summary
public N getNode()

Implements org.fxmisc.flowless.Cell.getNode.

Annotations
@Override
isReusableback to summary
public boolean isReusable()

Overrides default org.fxmisc.flowless.Cell.isReusable.

Doc from org.fxmisc.flowless.Cell.isReusable.

Indicates whether this cell can be reused to display different items.

Default implementation returns false.

Annotations
@Override
resetback to summary
public void reset()

Overrides default org.fxmisc.flowless.Cell.reset.

Doc from org.fxmisc.flowless.Cell.reset.

Called when this cell is no longer used to display its item. If this cell is reusable, it may later be asked to display a different item by a call to updateItem(Object).

Default implementation does nothing.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
updateIndexback to summary
public void updateIndex(int index)

Overrides default org.fxmisc.flowless.Cell.updateIndex.

Doc from org.fxmisc.flowless.Cell.updateIndex.

Called to update index of a visible cell.

Default implementation does nothing.

Annotations
@Override
updateItemback to summary
public void updateItem(T item)

Overrides default org.fxmisc.flowless.Cell.updateItem.

Doc from org.fxmisc.flowless.Cell.updateItem.

If this cell is reusable (as indicated by isReusable()), this method is called to display a different item. reset() will have been called before a call to this method.

The default implementation throws UnsupportedOperationException.

Annotations
@Override