- java.lang.Object
-
- io.github.mmm.ui.api.widget.AbstractUiWidget
-
- io.github.mmm.ui.spi.widget.AbstractUiNativeWidget
-
- io.github.mmm.ui.spi.widget.AbstractUiNativeWidgetWrapper<W>
-
- io.github.mmm.ui.fx.widget.FxWidget<javafx.scene.control.TableColumn<R,V>>
-
- io.github.mmm.ui.fx.widget.data.FxTableColumn<R,V>
-
- Type Parameters:
R
- type of the row data. Typically aBean
.V
- type of the value for the cells in this column.
- All Implemented Interfaces:
EventSource<UiEvent,UiEventListener>
,AttributeReadEnabled
,AttributeReadId
,AttributeReadTitle
,AttributeReadValid
,AttributeReadVisible
,AttributeWriteEnabled
,AttributeWriteId
,AttributeWriteReadOnly
,AttributeWriteResizable
,AttributeWriteTitle
,AttributeWriteTooltip
,AttributeWriteValidationFailure
,AttributeWriteVisible
,UiColumn<R,V>
,UiNativeWidget
,UiWidget
,UiNativeWidgetWrapper<javafx.scene.control.TableColumn<R,V>>
public class FxTableColumn<R,V> extends FxWidget<javafx.scene.control.TableColumn<R,V>> implements UiColumn<R,V>
Implementation ofUiColumn
for JavaFx.- Since:
- 1.0.0
-
-
Field Summary
-
Fields inherited from class io.github.mmm.ui.fx.widget.FxWidget
CLASS_INVALID, CLASS_READ_ONLY, widget
-
Fields inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteValidationFailure
STYLE_INVALID
-
-
Constructor Summary
Constructors Constructor Description FxTableColumn()
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFilterText()
Comparator<V>
getSortComparator()
SortOrder
getSortOrder()
String
getTitle()
boolean
isFiltering()
boolean
isResizable()
void
setAdapter(UiAbstractDataWidget.ColumnAdapter<R,V> adapter)
protected void
setEnabledNative(boolean enabled)
void
setFiltering(boolean filtering)
protected void
setIdNative(String id)
void
setProperty(TypedPropertyPath<V> property)
protected void
setReadOnlyNative(boolean readOnly)
void
setResizable(boolean resizable)
void
setSortComparator(Comparator<V> sortComparator)
void
setTitle(String title)
protected void
setTooltipNative(String newTooltip)
protected void
setVisibleNative(boolean visible)
-
Methods inherited from class io.github.mmm.ui.fx.widget.FxWidget
getTopNode, getWidget, onAction, onClose, onFocusChange, onFocusChanged, onValueChange, onValueChanged, setTooltip, setWidget
-
Methods inherited from class io.github.mmm.ui.spi.widget.AbstractUiNativeWidgetWrapper
createDefaultStyles, createStyles, getId, getStyles, getTooltip, onStylesChanged, setId, setTooltip
-
Methods inherited from class io.github.mmm.ui.spi.widget.AbstractUiNativeWidget
addListener, dispose, doDispose, doGetEnabledState, doGetVisibleState, doSetEnabledState, doSetEnabledState, doSetValidationFailure, doSetVisibleState, doSetVisibleState, ensureHandlers, fireEvent, getEventAdapter, getParent, getProgrammaticEventType, getReadOnlyFixed, getValidationFailure, hasListeners, isDisposed, isEnabled, isInitiallyVisible, isReadOnly, isValid, isVisible, isVisibleWithoutRoot, registerHandlers, removeListener, requireNotDisposed, setEnabled, setParent, setProgrammaticEventType, setReadOnly, setReadOnlyFixed, setValidationFailure, setVisible, unwrap, validateDown
-
Methods inherited from class io.github.mmm.ui.api.widget.AbstractUiWidget
isEmpty, setParent, unwrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeReadId
getId
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteId
setId
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteTooltip
getTooltip, setTooltip
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteValidationFailure
setValidationFailure
-
Methods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListener
-
Methods inherited from interface io.github.mmm.ui.api.widget.data.UiColumn
isEditable, isSortable, setEditable
-
Methods inherited from interface io.github.mmm.ui.spi.widget.UiNativeWidgetWrapper
getTopWidget
-
Methods inherited from interface io.github.mmm.ui.api.widget.UiWidget
cast, dispose, getModificationTimestamp, getParent, getReadOnlyFixed, getStyles, isDisposed, isEnabled, isEnabled, isFocused, isModified, isReadOnly, isValid, isVisible, isVisible, reset, setEnabled, setEnabled, setFocused, setReadOnly, setReadOnlyFixed, setVisible, setVisible, validate, validate, validate, validateDown, validateUp
-
-
-
-
Method Detail
-
setIdNative
protected void setIdNative(String id)
- Specified by:
setIdNative
in classAbstractUiNativeWidgetWrapper<javafx.scene.control.TableColumn<R,V>>
- Parameters:
id
- the newID
.
-
getTitle
public String getTitle()
- Specified by:
getTitle
in interfaceAttributeReadTitle
- Returns:
- the title of this object. Similar to
text
but more exposed (e.g. displayed in title-bar in case of a window). Will be the emptyString
if not set.
-
setTitle
public void setTitle(String title)
- Specified by:
setTitle
in interfaceAttributeWriteTitle
- Parameters:
title
- the new value oftitle
.
-
isResizable
public boolean isResizable()
- Specified by:
isResizable
in interfaceAttributeWriteResizable
- Returns:
true
if this object can beresized
by the end-user,false
otherwise.
-
setResizable
public void setResizable(boolean resizable)
- Specified by:
setResizable
in interfaceAttributeWriteResizable
- Parameters:
resizable
- is the new value ofAttributeWriteResizable.isResizable()
.
-
isFiltering
public boolean isFiltering()
- Specified by:
isFiltering
in interfaceUiColumn<R,V>
- Returns:
true
if this column allows filtering,false
otherwise. Typically filtering renders a text input at the bottom of the column header that allows to search for data in the cells. All rows that have values in this column which do not contain the filter text will be hidden from the data widget.
-
setFiltering
public void setFiltering(boolean filtering)
- Specified by:
setFiltering
in interfaceUiColumn<R,V>
-
getFilterText
public String getFilterText()
- Specified by:
getFilterText
in interfaceUiColumn<R,V>
- Returns:
- the current filter text for
filtering
.
-
getSortOrder
public SortOrder getSortOrder()
- Specified by:
getSortOrder
in interfaceUiColumn<R,V>
- Returns:
- the current
SortOrder
of this column ornull
if unsorted.
-
getSortComparator
public Comparator<V> getSortComparator()
- Specified by:
getSortComparator
in interfaceUiColumn<R,V>
- Returns:
- the
Comparator
used to sort the values. May benull
to disable sorting.
-
setSortComparator
public void setSortComparator(Comparator<V> sortComparator)
- Specified by:
setSortComparator
in interfaceUiColumn<R,V>
- Parameters:
sortComparator
- the new value ofUiColumn.getSortComparator()
. May benull
to disable sorting.- See Also:
Comparator.naturalOrder()
-
setVisibleNative
protected void setVisibleNative(boolean visible)
- Specified by:
setVisibleNative
in classAbstractUiNativeWidget
- Parameters:
visible
-true
to show this widget (in case its parent is also visible),false
to hide this widget.
-
setEnabledNative
protected void setEnabledNative(boolean enabled)
- Specified by:
setEnabledNative
in classAbstractUiNativeWidget
- Parameters:
enabled
- the newenabled state
. Usetrue
to enable andfalse
to disable this widget.
-
setReadOnlyNative
protected void setReadOnlyNative(boolean readOnly)
- Overrides:
setReadOnlyNative
in classFxWidget<javafx.scene.control.TableColumn<R,V>>
- Parameters:
readOnly
- the new value ofAbstractUiNativeWidget.isReadOnly()
.
-
setTooltipNative
protected void setTooltipNative(String newTooltip)
- Specified by:
setTooltipNative
in classAbstractUiNativeWidgetWrapper<javafx.scene.control.TableColumn<R,V>>
- Parameters:
newTooltip
- the new tooltip to apply.
-
setProperty
public void setProperty(TypedPropertyPath<V> property)
- Parameters:
property
- theproperty
to bind to this column.
-
setAdapter
public void setAdapter(UiAbstractDataWidget.ColumnAdapter<R,V> adapter)
- Parameters:
adapter
- theUiAbstractDataWidget.ColumnAdapter
.
-
-