Module org.controlsfx.controls
Interface CellGraphicFactory<T extends Node>
- 
public interface CellGraphicFactory<T extends Node>If anyone wants to display a specific Graphic in a SpreadsheetCell, a solution is to provide a Node (for example a WebView) that will be displayed in the cell. Because a Node can consume a lot of memory, we need thisCellGraphicFactorythat will recycle the Nodes to only provide them for visible cells. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NodegetNode(SpreadsheetCell cell)Returns aNodeto display in the cell graphic.ClassgetType()Returns the exact class used in this CellGraphicFactory.voidload(T node, SpreadsheetCell cell)When aNodeis reused (transfered from one cell to another for example), we ask the Node to reload.voidloadStyle(T node, SpreadsheetCell cell, Font font, Paint textFill, Pos alignment, Background background)Once aSpreadsheetCellhas been effectively loaded in the grid, this method is called if theNodewants to access the cell's graphic details.voidsetUnusedNode(T node)Once aNodeis no longer used in a cell, it is given back. 
 - 
 
- 
- 
Method Detail
- 
getNode
Node getNode(SpreadsheetCell cell)
Returns aNodeto display in the cell graphic. This is called internally by the SpreadsheetView when a cell is being visible and needs to display aNode.- Parameters:
 cell- the considered SpreadsheetCell- Returns:
 - a 
Nodeto display in the cell graphic 
 
- 
load
void load(T node, SpreadsheetCell cell)
When aNodeis reused (transfered from one cell to another for example), we ask the Node to reload. Beware, only reload when necessary! This method can be called several times with the sameNodeand itemValue.- Parameters:
 node- the consideredNodecell- the considered SpreadsheetCell
 
- 
loadStyle
void loadStyle(T node, SpreadsheetCell cell, Font font, Paint textFill, Pos alignment, Background background)
Once aSpreadsheetCellhas been effectively loaded in the grid, this method is called if theNodewants to access the cell's graphic details.- Parameters:
 node- the consideredNode, may benullfor empty cell.cell- the considered SpreadsheetCellfont- the cellFonttextFill- the text's coloralignment- the cell's vertical and horizontal alignmentbackground- the cell's background
 
- 
setUnusedNode
void setUnusedNode(T node)
Once aNodeis no longer used in a cell, it is given back.- Parameters:
 node- theNode
 
- 
getType
Class getType()
Returns the exact class used in this CellGraphicFactory. It is used to determine if the cell's graphic is handled by the cell of by this interface.- Returns:
 - the exact class used in this CellGraphicFactory
 
 
 - 
 
 -