public final class SpreadsheetColumn
extends java.lang.Object
SpreadsheetView is made up of a number of SpreadsheetColumn
instances.
SpreadsheetView itself, so there is no public constructor for this
class. To access the available columns, you need to call
SpreadsheetView.getColumns().
SpreadsheetColumn gives you the ability to modify some aspects of the column,
for example the width or
resizability of the column.
You have the ability to freeze this column at the left of the SpreadsheetView by
calling setFixed(boolean). But you are strongly advised to check if
it is possible with isColumnFixable() before calling
setFixed(boolean). Take a look at the SpreadsheetView
description to understand the freezing constraints.
If the column can be frozen, a ContextMenu will appear if the user right-clicks on it.
If not, nothing will appear and the user will not have the possibility to freeze it.

SpreadsheetView| Type | Property and Description |
|---|---|
javafx.beans.property.ObjectProperty |
filter |
javafx.beans.property.DoubleProperty |
maxWidth
Return the Property related to the maximum width of this
SpreadsheetColumn.
|
javafx.beans.property.DoubleProperty |
minWidth
Return the Property related to the minimum width of this
SpreadsheetColumn.
|
javafx.beans.property.ReadOnlyDoubleProperty |
width
Return the Property related to the actual width of the column.
|
| Modifier and Type | Method and Description |
|---|---|
javafx.beans.property.ObjectProperty |
filterProperty() |
void |
fitColumn()
If the column is resizable, it will compute the optimum width for all the
visible cells to be visible.
|
Filter |
getFilter()
Gets the value of the property filter.
|
double |
getMaxWidth()
Return the maximum width for this SpreadsheetColumn.
|
double |
getMinWidth()
Return the minimum width for this SpreadsheetColumn.
|
double |
getWidth()
Return the actual width of the column.
|
boolean |
isColumnFixable()
Indicate whether this column can be frozen or not.
|
boolean |
isFixed()
Return whether this column is frozen or not.
|
javafx.beans.property.DoubleProperty |
maxWidthProperty()
Return the Property related to the maximum width of this
SpreadsheetColumn.
|
javafx.beans.property.DoubleProperty |
minWidthProperty()
Return the Property related to the minimum width of this
SpreadsheetColumn.
|
void |
setFilter(Filter filter)
Sets the value of the property filter.
|
void |
setFixed(boolean fixed)
Freeze this column to the left if possible, although it is recommended that
you call
isColumnFixable() before trying to freeze a column. |
void |
setMaxWidth(double value)
Set the maximum width for this SpreadsheetColumn.
|
void |
setMinWidth(double value)
Set the minimum width for this SpreadsheetColumn.
|
void |
setPrefWidth(double width)
Set the width of this column.
|
void |
setResizable(boolean b)
If this column can be resized by the user
|
javafx.beans.property.ReadOnlyDoubleProperty |
widthProperty()
Return the Property related to the actual width of the column.
|
public final javafx.beans.property.ReadOnlyDoubleProperty widthProperty
getWidth()public final javafx.beans.property.DoubleProperty minWidthProperty
getMinWidth(),
setMinWidth(double)public final javafx.beans.property.DoubleProperty maxWidthProperty
getMaxWidth(),
setMaxWidth(double)public javafx.beans.property.ObjectProperty filterProperty
getFilter(),
setFilter(Filter)public boolean isFixed()
public void setFixed(boolean fixed)
isColumnFixable() before trying to freeze a column.
If you want to freeze several columns (because of a span for example), add
all the columns directly in SpreadsheetView.getFixedColumns().
Always use SpreadsheetView.areSpreadsheetColumnsFixable(java.util.List) before.fixed - public void setPrefWidth(double width)
width - public double getWidth()
public final javafx.beans.property.ReadOnlyDoubleProperty widthProperty()
getWidth()public final void setMinWidth(double value)
value - public final double getMinWidth()
public final javafx.beans.property.DoubleProperty minWidthProperty()
getMinWidth(),
setMinWidth(double)public final javafx.beans.property.DoubleProperty maxWidthProperty()
getMaxWidth(),
setMaxWidth(double)public final void setMaxWidth(double value)
value - public final double getMaxWidth()
public void setResizable(boolean b)
b - public void fitColumn()
public boolean isColumnFixable()
setFixed(boolean) or adding an item to
SpreadsheetView.getFixedColumns().
A column cannot be frozen alone if any cell inside the column has a column
span superior to one.public void setFilter(Filter filter)
public Filter getFilter()
public javafx.beans.property.ObjectProperty filterProperty()
getFilter(),
setFilter(Filter)