- 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 ofUiNativeWidgetfor JavaFx.- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static javafx.css.PseudoClassCLASS_INVALIDPseudoClassif JavaFx widget getsinvalid.static javafx.css.PseudoClassCLASS_READ_ONLYPseudoClassif JavaFx widget getsread-only.protected Wwidget-
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.NodegetTopNode(UiWidget uiWidget)WgetWidget()protected voidonAction(javafx.event.ActionEvent event)protected voidonClose(javafx.event.Event event)protected voidonFocusChange(javafx.beans.value.ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue)protected voidonFocusChanged(boolean focusGain)protected <V> voidonValueChange(javafx.beans.value.ObservableValue<? extends V> observable, V oldValue, V newValue)protected voidonValueChanged(boolean programmatic)Called fromonValueChange(ObservableValue, Object, Object)if triggered by end-user.protected voidsetReadOnlyNative(boolean readOnly)static voidsetTooltip(javafx.scene.control.Control widget, String tooltip)protected voidsetWidget(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
PseudoClassif JavaFx widget getsinvalid.
-
CLASS_READ_ONLY
public static final javafx.css.PseudoClass CLASS_READ_ONLY
PseudoClassif 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
containingJavaFxNode.
-
setReadOnlyNative
protected void setReadOnlyNative(boolean readOnly)
- Specified by:
setReadOnlyNativein classAbstractUiNativeWidget- Parameters:
readOnly- the new value ofAbstractUiNativeWidget.isReadOnly().
-
setTooltip
public static void setTooltip(javafx.scene.control.Control widget, String tooltip)- Parameters:
widget- theControlwhere 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-trueif the focus was gained,falseotherwise (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.
-
-