public class BaseColumn<S,T>
extends javafx.scene.control.TableColumn<S,T>
TextColumn
and ComboBoxColumn
source code to get reference on building
your own column.
Column that doesn't extend BaseColumn, i.e: TickColumn
will be skipped by export-to-excel and paste routineType | Property and Description |
---|---|
javafx.beans.property.BooleanProperty |
filterable |
javafx.beans.property.BooleanProperty |
required |
javafx.beans.property.SimpleObjectProperty<TableCriteria> |
tableCriteria
Property that holds applied criteria to column
|
cellFactoryProperty, cellValueFactoryProperty, comparatorProperty, contextMenuProperty, editableProperty, graphicProperty, idProperty, maxWidthProperty, minWidthProperty, onEditCancelProperty, onEditCommitProperty, onEditStartProperty, parentColumnProperty, prefWidthProperty, resizableProperty, sortableProperty, sortNodeProperty, sortTypeProperty, styleProperty, tableViewProperty, textProperty, visibleProperty, widthProperty
Modifier and Type | Field and Description |
---|---|
protected javafx.geometry.Pos |
alignment |
Constructor and Description |
---|
BaseColumn(java.lang.String propertyName,
double prefWidth) |
BaseColumn(java.lang.String propertyName,
double prefWidth,
java.lang.String columnHeader) |
Modifier and Type | Method and Description |
---|---|
protected T |
convertFromString_Impl(java.lang.String stringValue) |
T |
convertFromString(java.lang.String stringValue)
Convert
stringValue to value that is acceptable
by this column. |
java.lang.String |
convertToString(T value)
Convert
value to String as represented in TableControl |
javafx.beans.property.BooleanProperty |
filterableProperty() |
javafx.geometry.Pos |
getAlignment()
Gets cell alignment
|
java.lang.String |
getPropertyName()
Gets propertyName passed in constructor
|
TableCriteria |
getTableCriteria()
Get criteria applied to this column
|
boolean |
isFilterable()
Gets the value of the property filterable.
|
boolean |
isRequired()
Gets the value of the property required.
|
javafx.beans.property.BooleanProperty |
requiredProperty() |
void |
setAlignment(javafx.geometry.Pos alignment)
Sets cell alignment
|
void |
setFilterable(boolean filterable)
Specifies whether right clicking the column will show menu item to do
filtering.
|
void |
setRequired(boolean required)
Set the field to required and cannot null.
|
void |
setTableCriteria(TableCriteria crit)
Set criteria to be applied to column.
|
javafx.beans.property.SimpleObjectProperty<TableCriteria> |
tableCriteriaProperty()
Property that holds applied criteria to column
|
addEventHandler, buildEventDispatchChain, cellFactoryProperty, cellValueFactoryProperty, comparatorProperty, contextMenuProperty, editableProperty, editAnyEvent, editCancelEvent, editCommitEvent, editStartEvent, getCellData, getCellData, getCellFactory, getCellObservableValue, getCellObservableValue, getCellValueFactory, getColumns, getComparator, getContextMenu, getGraphic, getId, getMaxWidth, getMinWidth, getOnEditCancel, getOnEditCommit, getOnEditStart, getParentColumn, getPrefWidth, getProperties, getSortNode, getSortType, getStyle, getStyleClass, getTableView, getText, getUserData, getWidth, graphicProperty, hasProperties, idProperty, impl_getStyleable, impl_setWidth, isEditable, isResizable, isSortable, isVisible, maxWidthProperty, minWidthProperty, onEditCancelProperty, onEditCommitProperty, onEditStartProperty, parentColumnProperty, prefWidthProperty, removeEventHandler, resizableProperty, setCellFactory, setCellValueFactory, setComparator, setContextMenu, setEditable, setGraphic, setId, setMaxWidth, setMinWidth, setOnEditCancel, setOnEditCommit, setOnEditStart, setPrefWidth, setResizable, setSortable, setSortNode, setSortType, setStyle, setText, setUserData, setVisible, sortableProperty, sortNodeProperty, sortTypeProperty, styleProperty, tableViewProperty, textProperty, visibleProperty, widthProperty
public BaseColumn(java.lang.String propertyName, double prefWidth)
propertyName
- java bean property name to be used for get/set method
using introspectionprefWidth
- preferred collumn widthpublic BaseColumn(java.lang.String propertyName, double prefWidth, java.lang.String columnHeader)
propertyName
- java bean property name to be used for get/set method
using introspectionprefWidth
- preferred collumn widthcolumnHeader
- column header text. Default equals propertyName. This
text is localizedpublic javafx.beans.property.SimpleObjectProperty<TableCriteria> tableCriteriaProperty()
public TableCriteria getTableCriteria()
tableCriteriaProperty()
public void setTableCriteria(TableCriteria crit)
TableControl.setReloadOnCriteriaChange(boolean)
and pass FALSE as parameter. It will disable autoreload on criteria change. After assign all
criteria, call TableControl.reloadFirstPage()
. You might want to set TableControl.setReloadOnCriteriaChange(boolean)
back to true
after that.crit
- TableControl.setReloadOnCriteriaChange(boolean)
public java.lang.String getPropertyName()
public javafx.geometry.Pos getAlignment()
public void setAlignment(javafx.geometry.Pos alignment)
alignment
- public javafx.beans.property.BooleanProperty filterableProperty()
public void setFilterable(boolean filterable)
public boolean isFilterable()
public void setRequired(boolean required)
required
- public boolean isRequired()
public javafx.beans.property.BooleanProperty requiredProperty()
public T convertFromString(java.lang.String stringValue)
stringValue
to value that is acceptable
by this column.
Avoid to override this method, override convertFromString_Impl
instead.
This method will throw runtime exception if stringValue parameter is not empty but the conversion
result is null. In case of CheckBoxColumn, this method is overridden because CheckBoxColumn has
nullLabel for null value.stringValue
- protected T convertFromString_Impl(java.lang.String stringValue)
public java.lang.String convertToString(T value)
value
to String as represented in TableControlvalue
-