Module org.controlsfx.controls
Class SpreadsheetCellType.DoubleType
- java.lang.Object
-
- org.controlsfx.control.spreadsheet.SpreadsheetCellType<Double>
-
- org.controlsfx.control.spreadsheet.SpreadsheetCellType.DoubleType
-
- Enclosing class:
- SpreadsheetCellType<T>
public static class SpreadsheetCellType.DoubleType extends SpreadsheetCellType<Double>
TheSpreadsheetCellDoubletype base class.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.controlsfx.control.spreadsheet.SpreadsheetCellType
SpreadsheetCellType.DateType, SpreadsheetCellType.DoubleType, SpreadsheetCellType.IntegerType, SpreadsheetCellType.ListType, SpreadsheetCellType.ObjectType, SpreadsheetCellType.StringType
-
-
Constructor Summary
Constructors Constructor Description DoubleType()DoubleType(StringConverter<Double> converter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleconvertValue(Object value)This method will be called when a commit is happening.
This method will try to convert the value, be sure to callSpreadsheetCellType.match(Object)before to see if this method will succeed.SpreadsheetCellcreateCell(int row, int column, int rowSpan, int columnSpan, Double value)Creates a cell that hold a Double at the specified position, with the specified row/column span.SpreadsheetCellEditorcreateEditor(SpreadsheetView view)Creates an editor for this type of cells.booleanmatch(Object value, Object... options)Verify that the upcoming value can be set to the current cell.This is the first level of verification to prevent affecting a text to a double or a double to a date.StringtoString()StringtoString(Double item)Return a string representation of the given item for theSpreadsheetViewto display using the innerSpreadsheetCellType.converter.StringtoString(Double item, String format)Return a string representation of the given item for theSpreadsheetViewto display using the innerSpreadsheetCellType.converterand the specified format.-
Methods inherited from class org.controlsfx.control.spreadsheet.SpreadsheetCellType
acceptDrop, isError, LIST, match
-
-
-
-
Constructor Detail
-
DoubleType
public DoubleType()
-
DoubleType
public DoubleType(StringConverter<Double> converter)
-
-
Method Detail
-
createCell
public SpreadsheetCell createCell(int row, int column, int rowSpan, int columnSpan, Double value)
Creates a cell that hold a Double at the specified position, with the specified row/column span.- Parameters:
row- row numbercolumn- column numberrowSpan- rowSpan (1 is normal)columnSpan- ColumnSpan (1 is normal)value- the value to display- Returns:
- a
SpreadsheetCell
-
createEditor
public SpreadsheetCellEditor createEditor(SpreadsheetView view)
Description copied from class:SpreadsheetCellTypeCreates an editor for this type of cells.- Specified by:
createEditorin classSpreadsheetCellType<Double>- Parameters:
view- the spreadsheet that will own this editor- Returns:
- the editor instance
-
match
public boolean match(Object value, Object... options)
Description copied from class:SpreadsheetCellTypeVerify that the upcoming value can be set to the current cell.This is the first level of verification to prevent affecting a text to a double or a double to a date. For closer verification, useSpreadsheetCellType.isError(Object).- Specified by:
matchin classSpreadsheetCellType<Double>- Parameters:
value- the value to testoptions- the options given bySpreadsheetCell.getOptionsForEditor()- Returns:
- true if it matches.
-
convertValue
public Double convertValue(Object value)
Description copied from class:SpreadsheetCellTypeThis method will be called when a commit is happening.
This method will try to convert the value, be sure to callSpreadsheetCellType.match(Object)before to see if this method will succeed.- Specified by:
convertValuein classSpreadsheetCellType<Double>- Returns:
- null if not valid or the correct value otherwise.
-
toString
public String toString(Double item)
Description copied from class:SpreadsheetCellTypeReturn a string representation of the given item for theSpreadsheetViewto display using the innerSpreadsheetCellType.converter.- Specified by:
toStringin classSpreadsheetCellType<Double>- Returns:
- a string representation of the given item.
-
toString
public String toString(Double item, String format)
Description copied from class:SpreadsheetCellTypeReturn a string representation of the given item for theSpreadsheetViewto display using the innerSpreadsheetCellType.converterand the specified format.- Overrides:
toStringin classSpreadsheetCellType<Double>- Returns:
- a string representation of the given item.
-
-