Module org.controlsfx.controls
Class SpreadsheetCellEditor.IntegerEditor
- java.lang.Object
-
- org.controlsfx.control.spreadsheet.SpreadsheetCellEditor
-
- org.controlsfx.control.spreadsheet.SpreadsheetCellEditor.IntegerEditor
-
- Enclosing class:
- SpreadsheetCellEditor
public static class SpreadsheetCellEditor.IntegerEditor extends SpreadsheetCellEditor
ASpreadsheetCellEditor
forSpreadsheetCellType.DoubleType
typed cells. It displays aTextField
where the user can type different numbers. Only numbers will be stored.
Moreover, theTextField
will turn red if the value currently entered if incorrect.
-
-
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
Constructors Constructor Description IntegerEditor(SpreadsheetView view)
Constructor for the IntegerEditor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
end()
This method will be called at the end of edition.
You will be offered the possibility to do the configuration post editing.String
getControlValue()
Return the value within your editor as a string.TextField
getEditor()
Return the control used for controlling the input.void
startEdit(Object value, String format, Object... options)
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 Detail
-
IntegerEditor
public IntegerEditor(SpreadsheetView view)
Constructor for the IntegerEditor.- Parameters:
view
- the SpreadsheetView
-
-
Method Detail
-
startEdit
public void startEdit(Object value, String format, Object... options)
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
-
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 TextField 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
public String 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.
-
-