Top Fields Constructors Methods
impl.org.controlsfx.spreadsheet

public Class GridCellEditor

extends Object
Class Inheritance
Imports
javafx.beans.InvalidationListener, .Observable, javafx.beans.binding.Bindings, .BooleanExpression, javafx.beans.value.ChangeListener, .ObservableValue, javafx.event.EventHandler, javafx.scene.Node, javafx.scene.control.Control, .TextArea, javafx.scene.input.KeyCode, .KeyEvent, org.controlsfx.control.spreadsheet.SpreadsheetCell, .SpreadsheetCellEditor, .SpreadsheetCellType, .SpreadsheetView

Field Summary

Modifier and TypeField and Description
private boolean
private final InvalidationListener
private final EventHandler<KeyEvent>
enterKeyPressed

When we stop editing a cell, if enter was pressed, we want to go to the next line.

private final ChangeListener<Boolean>
private BooleanExpression
private final SpreadsheetHandle
handle

Protected/Private Fields * *

private KeyCode
private SpreadsheetCell
private SpreadsheetCellEditor
private CellView

Constructor Summary

AccessConstructor and Description
public
GridCellEditor(SpreadsheetHandle handle)

Construct the GridCellEditor.

Method Summary

Modifier and TypeMethod and Description
private void
end()

public void
endEdit(boolean
true means commit, false means cancel
commitValue
)

Whenever you want to stop the edition, you call that method.

private BooleanExpression
getFocusProperty(Control control)

If we have a TextArea, we need to return a custom BooleanExpression because we want to let the editor in place even if the user is touching the scrollBars inside the textArea.

public SpreadsheetCell
public boolean

Returns:

if this editor is being used.
isEditing
()

Return if this editor is currently being used.

pack-priv void
startEdit()

Protected/Private Methods * *

public void
public void
updateSpreadsheetCell(CellView cell)

Update the internal CellView

public void
updateSpreadsheetCellEditor(final SpreadsheetCellEditor spreadsheetCellEditor)

Update the SpreadsheetCellEditor

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

editingback to summary
private boolean editing
endEditionListenerback to summary
private final InvalidationListener endEditionListener
enterKeyPressedback to summary
private final EventHandler<KeyEvent> enterKeyPressed

When we stop editing a cell, if enter was pressed, we want to go to the next line.

focusListenerback to summary
private final ChangeListener<Boolean> focusListener
focusPropertyback to summary
private BooleanExpression focusProperty
handleback to summary
private final SpreadsheetHandle handle

Protected/Private Fields * *

lastKeyPressedback to summary
private KeyCode lastKeyPressed
modelCellback to summary
private SpreadsheetCell modelCell
spreadsheetCellEditorback to summary
private SpreadsheetCellEditor spreadsheetCellEditor
viewCellback to summary
private CellView viewCell

Constructor Detail

GridCellEditorback to summary
public GridCellEditor(SpreadsheetHandle handle)

Construct the GridCellEditor.

Method Detail

endback to summary
private void end()
endEditback to summary
public void endEdit(boolean commitValue)

Whenever you want to stop the edition, you call that method.
True means you're trying to commit the value, then SpreadsheetCellType#match(java.lang.Object) will be called in order to verify that the value is correct.
False means you're trying to cancel the value and it will be follow by end().
See SpreadsheetCellEditor description

Parameters
commitValue:boolean

true means commit, false means cancel

getFocusPropertyback to summary
private BooleanExpression getFocusProperty(Control control)

If we have a TextArea, we need to return a custom BooleanExpression because we want to let the editor in place even if the user is touching the scrollBars inside the textArea.

getModelCellback to summary
public SpreadsheetCell getModelCell()
isEditingback to summary
public boolean isEditing()

Return if this editor is currently being used.

Returns:boolean

if this editor is being used.

startEditback to summary
pack-priv void startEdit()

Protected/Private Methods * *

updateDataCellback to summary
public void updateDataCell(SpreadsheetCell cell)

Update the internal SpreadsheetCell.

updateSpreadsheetCellback to summary
public void updateSpreadsheetCell(CellView cell)

Update the internal CellView

updateSpreadsheetCellEditorback to summary
public void updateSpreadsheetCellEditor(final SpreadsheetCellEditor spreadsheetCellEditor)

Update the SpreadsheetCellEditor