Module org.controlsfx.controls
Class SpreadsheetCellEditor.DateEditor
java.lang.Object
org.controlsfx.control.spreadsheet.SpreadsheetCellEditor
org.controlsfx.control.spreadsheet.SpreadsheetCellEditor.DateEditor
- Enclosing class:
SpreadsheetCellEditor
A
SpreadsheetCellEditor
for SpreadsheetCellType.DateType
typed cells. It displays a DatePicker
where the user can choose a
date through a visual calendar.-
Nested Class Summary
Nested classes/interfaces inherited from class org.controlsfx.control.spreadsheet.SpreadsheetCellEditor
SpreadsheetCellEditor.DateEditor, SpreadsheetCellEditor.DoubleEditor, SpreadsheetCellEditor.IntegerEditor, SpreadsheetCellEditor.ListEditor<R>, SpreadsheetCellEditor.ObjectEditor, SpreadsheetCellEditor.StringEditor, SpreadsheetCellEditor.TextAreaEditor
-
Constructor Summary
ConstructorsConstructorDescriptionDateEditor
(SpreadsheetView view, javafx.util.StringConverter<LocalDate> converter) Constructor for the DateEditor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
end()
This method will be called at the end of edition.
You will be offered the possibility to do the configuration post editing.Return the value within your editor as a string.javafx.scene.control.DatePicker
Return the control used for controlling the input.void
Does the same asSpreadsheetCellEditor.startEdit(java.lang.Object)
but you have also theSpreadsheetCell.getFormat()
sent.Methods inherited from class org.controlsfx.control.spreadsheet.SpreadsheetCellEditor
endEdit, getMaxHeight, startEdit
-
Constructor Details
-
DateEditor
Constructor for the DateEditor.- Parameters:
view
- the SpreadsheetViewconverter
- A Converter for converting a date to a String.
-
-
Method Details
-
startEdit
Does the same asSpreadsheetCellEditor.startEdit(java.lang.Object)
but you have also theSpreadsheetCell.getFormat()
sent. This is useful when editing Date for example, when you want to display it with the cell format. Also options given by a Spreadsheetcell withSpreadsheetCell.getOptionsForEditor()
are given.- Specified by:
startEdit
in classSpreadsheetCellEditor
- Parameters:
value
-format
-options
-
-
end
public void end()This method will be called at the end of edition.
You will be offered the possibility to do the configuration post editing.- Specified by:
end
in classSpreadsheetCellEditor
-
getEditor
public javafx.scene.control.DatePicker getEditor()Return the control used for controlling the input. This is called at the beginning in order to display your control in the cell.- Specified by:
getEditor
in classSpreadsheetCellEditor
- Returns:
- the control used.
-
getControlValue
Return the value within your editor as a string. This will be used by theSpreadsheetCellType.convertValue(Object)
in order to compute whether the value is valid regarding theSpreadsheetCellType
policy.- Specified by:
getControlValue
in classSpreadsheetCellEditor
- Returns:
- the value within your editor as a string.
-