- 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<W>
-
- Type Parameters:
W
- type ofJavaFx widget
.
- All Implemented Interfaces:
EventSource<UiEvent,UiEventListener>
,AttributeReadEnabled
,AttributeReadId
,AttributeReadValid
,AttributeReadVisible
,AttributeWriteEnabled
,AttributeWriteId
,AttributeWriteReadOnly
,AttributeWriteTooltip
,AttributeWriteValidationFailure
,AttributeWriteVisible
,UiNativeWidget
,UiWidget
,UiNativeWidgetWrapper<W>
- Direct Known Subclasses:
FxAbstractWindow
,FxTableColumn
,FxWidgetStyleable
public abstract class FxWidget<W> extends AbstractUiNativeWidgetWrapper<W>
Implementation ofUiNativeWidget
for JavaFx.- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static javafx.css.PseudoClass
CLASS_INVALID
PseudoClass
if JavaFx widget getsinvalid
.static javafx.css.PseudoClass
CLASS_READ_ONLY
PseudoClass
if JavaFx widget getsread-only
.protected W
widget
-
Fields inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteValidationFailure
STYLE_INVALID
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static javafx.scene.Node
getTopNode(UiWidget uiWidget)
W
getWidget()
protected void
onAction(javafx.event.ActionEvent event)
protected void
onClose(javafx.event.Event event)
protected void
onFocusChange(javafx.beans.value.ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue)
protected void
onFocusChanged(boolean focusGain)
protected <V> void
onValueChange(javafx.beans.value.ObservableValue<? extends V> observable, V oldValue, V newValue)
protected void
onValueChanged(boolean programmatic)
Called fromonValueChange(ObservableValue, Object, Object)
if triggered by end-user.protected void
setReadOnlyNative(boolean readOnly)
static void
setTooltip(javafx.scene.control.Control widget, String tooltip)
protected void
setWidget(W widget)
-
Methods inherited from class io.github.mmm.ui.spi.widget.AbstractUiNativeWidgetWrapper
createDefaultStyles, createStyles, getId, getStyles, getTooltip, onStylesChanged, setId, setIdNative, setTooltip, setTooltipNative
-
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, setEnabledNative, setParent, setProgrammaticEventType, setReadOnly, setReadOnlyFixed, setValidationFailure, setVisible, setVisibleNative, 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.AttributeWriteValidationFailure
setValidationFailure
-
Methods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListener
-
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, isDisposed, isEnabled, isEnabled, isFocused, isModified, isReadOnly, isValid, isVisible, isVisible, reset, setEnabled, setEnabled, setFocused, setReadOnly, setReadOnlyFixed, setVisible, setVisible, validate, validate, validate, validateDown, validateUp
-
-
-
-
Field Detail
-
CLASS_INVALID
public static final javafx.css.PseudoClass CLASS_INVALID
PseudoClass
if JavaFx widget getsinvalid
.
-
CLASS_READ_ONLY
public static final javafx.css.PseudoClass CLASS_READ_ONLY
PseudoClass
if JavaFx widget getsread-only
.
-
widget
protected W widget
- See Also:
getWidget()
-
-
Constructor Detail
-
FxWidget
public FxWidget(W widget)
The constructor.- Parameters:
widget
- theJavaFx widget
.
-
-
Method Detail
-
getWidget
public W getWidget()
- Returns:
- the underlying native widget wrapped by this
UiNativeWidget
.
-
getTopNode
public static javafx.scene.Node getTopNode(UiWidget uiWidget)
- Parameters:
uiWidget
- theUiWidget
.- Returns:
- the
containing
JavaFxNode
.
-
setReadOnlyNative
protected void setReadOnlyNative(boolean readOnly)
- Specified by:
setReadOnlyNative
in classAbstractUiNativeWidget
- Parameters:
readOnly
- the new value ofAbstractUiNativeWidget.isReadOnly()
.
-
setTooltip
public static void setTooltip(javafx.scene.control.Control widget, String tooltip)
- Parameters:
widget
- theControl
where to apply the tooltip to.tooltip
- the tooltip text to apply.
-
onAction
protected void onAction(javafx.event.ActionEvent event)
- Parameters:
event
- theActionEvent
.
-
onFocusChange
protected void onFocusChange(javafx.beans.value.ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue)
- Parameters:
observable
- the observable (property) that changed.oldValue
- the old value.newValue
- the new value.
-
onFocusChanged
protected void onFocusChanged(boolean focusGain)
- Parameters:
focusGain
-true
if the focus was gained,false
otherwise (focus has been lost).
-
onValueChange
protected <V> void onValueChange(javafx.beans.value.ObservableValue<? extends V> observable, V oldValue, V newValue)
- Type Parameters:
V
- type of the value.- Parameters:
observable
- the observable (property) that changed.oldValue
- the old value.newValue
- the new value.
-
onValueChanged
protected void onValueChanged(boolean programmatic)
Called fromonValueChange(ObservableValue, Object, Object)
if triggered by end-user.- Parameters:
programmatic
- - seeUiEvent.isProgrammatic()
.
-
onClose
protected void onClose(javafx.event.Event event)
- Parameters:
event
- the closeEvent
.
-
-