Module io.github.mmm.ui.fx.form
Package io.github.mmm.ui.fx.widget.form
Class FxCompositeInput<V,W extends javafx.scene.layout.Pane>
- 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>
-
- io.github.mmm.ui.fx.widget.FxWidgetStyleable<W>
-
- io.github.mmm.ui.fx.widget.FxWidgetNode<W>
-
- io.github.mmm.ui.fx.widget.FxActiveWidget<W>
-
- io.github.mmm.ui.fx.widget.FxActiveValidatableWidget<W,V>
-
- io.github.mmm.ui.fx.widget.input.FxInput<W,V>
-
- io.github.mmm.ui.fx.widget.form.FxCompositeInput<V,W>
-
- Type Parameters:
W- type ofJavaFx widget.V- type ofvalue.
- All Implemented Interfaces:
EventSource<UiEvent,UiEventListener>,AttributeReadEnabled,AttributeReadId,AttributeReadValid,AttributeReadValue<V>,AttributeReadVisible,AttributeWriteEnabled,AttributeWriteId,AttributeWritePrefix,AttributeWriteReadOnly,AttributeWriteSuffix,AttributeWriteTooltip,AttributeWriteValidationFailure,AttributeWriteValue<V>,AttributeWriteValueForUser<V>,AttributeWriteVisible,UiComposite<UiRegularWidget>,UiFailureComposite<UiRegularWidget>,UiMutableComposite<UiRegularWidget>,UiRemovableComposite<UiRegularWidget>,UiAbstractCompositeInput<UiRegularWidget,V>,UiCompositeInput<V>,UiAbstractInput<V>,UiInput<V>,UiActiveWidget,UiNativeWidget,UiRegularWidget,UiWidget,UiBindableWidget<V>,UiValidatableWidget<V>,UiValuedWidget<V>,UiNativeWidgetWrapper<W>
- Direct Known Subclasses:
FxHorizontalInput
public class FxCompositeInput<V,W extends javafx.scene.layout.Pane> extends FxInput<W,V> implements UiCompositeInput<V>
Implementation ofUiCompositeInputfor JavaFx.- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected List<UiRegularWidget>children-
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.AttributeWritePrefix
STYLE_PREFIX, STYLE_WITH_PREFIX
-
Fields inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteSuffix
STYLE_SUFFIX, STYLE_WITH_SUFFIX
-
Fields inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteValidationFailure
STYLE_INVALID
-
Fields inherited from interface io.github.mmm.ui.api.widget.UiActiveWidget
ACCESS_KEY_NONE
-
Fields inherited from interface io.github.mmm.ui.api.widget.input.UiInput
STYLE_INPUT
-
Fields inherited from interface io.github.mmm.ui.api.widget.value.UiValidatableWidget
STYLE_MANDATORY
-
-
Constructor Summary
Constructors Constructor Description FxCompositeInput(W widget)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(UiRegularWidget child, int index)Inserts the givenchildat the givenindex.protected voidaddChildWidget(UiRegularWidget child, int index)UiRegularWidgetgetChild(int index)intgetChildCount()intgetChildIndex(UiRegularWidget child)VgetValueOrThrow()voidinitBinding(UiValueBinding<V> newBinding)Initializes the value binding.UiRegularWidgetremoveChild(int index)This method removes the child at the givenindexfrom this panel.protected voidremoveChildWidget(UiRegularWidget child, int index)voidsetValue(V value, boolean forUser)protected voidsetValueNative(V value)-
Methods inherited from class io.github.mmm.ui.fx.widget.input.FxInput
getContainerWidget, getHBox, getName, getNameWidget, getPrefix, getPrefixLabel, getSuffix, getSuffixLabel, getTopWidget, hasContainerWidget, hasNameWidget, initHBox, setMandatory, setName, setPrefix, setReadOnlyNative, setSuffix, setVisible
-
Methods inherited from class io.github.mmm.ui.fx.widget.FxActiveValidatableWidget
doSetValidationFailure, getModificationTimestamp, getOriginalValue, getValidator, onFocusChanged, onValueChanged, setOriginalValue, setValidator
-
Methods inherited from class io.github.mmm.ui.fx.widget.FxActiveWidget
getAccessKey, isFocused, registerFocusChangeHandler, registerHandlers, setAccessKey, setFocused, setParent
-
Methods inherited from class io.github.mmm.ui.fx.widget.FxWidgetNode
setEnabledNative, setIdNative, setTooltipNative, setVisibleNative
-
Methods inherited from class io.github.mmm.ui.fx.widget.FxWidgetStyleable
createStyles
-
Methods inherited from class io.github.mmm.ui.fx.widget.FxWidget
getTopNode, getWidget, onAction, onClose, onFocusChange, onValueChange, setTooltip, setWidget
-
Methods inherited from class io.github.mmm.ui.spi.widget.AbstractUiNativeWidgetWrapper
createDefaultStyles, getId, getStyles, getTooltip, onStylesChanged, setId, setTooltip
-
Methods inherited from class io.github.mmm.ui.spi.widget.AbstractUiNativeWidget
addListener, dispose, doDispose, doGetEnabledState, doGetVisibleState, doSetEnabledState, doSetEnabledState, doSetVisibleState, doSetVisibleState, ensureHandlers, fireEvent, getEventAdapter, getParent, getProgrammaticEventType, getReadOnlyFixed, getValidationFailure, hasListeners, isDisposed, isEnabled, isInitiallyVisible, isReadOnly, isValid, isVisible, isVisibleWithoutRoot, removeListener, requireNotDisposed, setEnabled, setProgrammaticEventType, setReadOnly, setReadOnlyFixed, setValidationFailure, 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.AttributeWritePrefix
getPrefix, setPrefix
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteSuffix
getSuffix, setSuffix
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteTooltip
getTooltip, setTooltip
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteValidationFailure
getValidationFailure, setValidationFailure, setValidationFailure
-
Methods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListener
-
Methods inherited from interface io.github.mmm.ui.api.widget.form.UiAbstractCompositeInput
isValid, reset
-
Methods inherited from interface io.github.mmm.ui.api.widget.input.UiAbstractInput
getName, setName
-
Methods inherited from interface io.github.mmm.ui.api.widget.composite.UiComposite
getChild, getDescendant, getModificationTimestamp, getPropagation, isModified, setFocused
-
Methods inherited from interface io.github.mmm.ui.api.widget.input.UiInput
getContainerWidget, getNameWidget, hasContainerWidget, hasNameWidget
-
Methods inherited from interface io.github.mmm.ui.api.widget.composite.UiMutableComposite
addChild
-
Methods inherited from interface io.github.mmm.ui.api.widget.composite.UiRemovableComposite
removeChild
-
Methods inherited from interface io.github.mmm.ui.api.widget.value.UiValidatableWidget
getOriginalValue, getValidator, getValue, isValid, reset, setOriginalValue, setValidator, setValue, setValueForUser
-
Methods inherited from interface io.github.mmm.ui.api.widget.UiWidget
cast, dispose, getParent, getReadOnlyFixed, getStyles, isDisposed, isEnabled, isEnabled, isFocused, isReadOnly, isVisible, isVisible, setEnabled, setEnabled, setReadOnly, setReadOnlyFixed, setVisible, setVisible, validate, validate, validate, validateDown, validateUp
-
-
-
-
Field Detail
-
children
protected final List<UiRegularWidget> children
- See Also:
getChild(int)
-
-
Constructor Detail
-
FxCompositeInput
public FxCompositeInput(W widget)
The constructor.- Parameters:
widget- theJavaFx widget.
-
-
Method Detail
-
initBinding
public void initBinding(UiValueBinding<V> newBinding)
Description copied from interface:UiBindableWidgetInitializes the value binding.- Specified by:
initBindingin interfaceUiBindableWidget<V>- Parameters:
newBinding- theUiValueBindingdefining how to read and write the value.
-
getChildCount
public int getChildCount()
- Specified by:
getChildCountin interfaceUiComposite<V>- Returns:
- the number of direct children contained in this widget.
-
getChild
public UiRegularWidget getChild(int index)
- Specified by:
getChildin interfaceUiComposite<V>- Parameters:
index- is the index of the requested child. Should be in the range from0to.UiComposite.getChildCount()- 1- Returns:
- the requested child or
nullif no such child exists. - See Also:
List.get(int)
-
getChildIndex
public int getChildIndex(UiRegularWidget child)
- Specified by:
getChildIndexin interfaceUiComposite<V>- Parameters:
child- thechildto look for.- Returns:
- the index of the given
childor-1if no suchchildexists.
-
removeChild
public UiRegularWidget removeChild(int index)
Description copied from interface:UiRemovableCompositeThis method removes the child at the givenindexfrom this panel.- Specified by:
removeChildin interfaceUiRemovableComposite<V>- Parameters:
index- is theindexof the child to remove. It has to be in the range from0to.UiComposite.getChildCount()- 1- Returns:
- the removed child that has previously been at the given
index. - See Also:
List.remove(int)
-
removeChildWidget
protected void removeChildWidget(UiRegularWidget child, int index)
- Parameters:
child- the child to remove.index- the index of the child to remove.- See Also:
UiRemovableComposite.removeChild(UiWidget),removeChild(int)
-
addChild
public void addChild(UiRegularWidget child, int index)
Description copied from interface:UiMutableCompositeInserts the givenchildat the givenindex.- Specified by:
addChildin interfaceUiMutableComposite<V>- Parameters:
child- is theUiWidgetto add as child of this composite.index- is theindexof the new child. It has to be in the range from0toUiComposite.getChildCount().- See Also:
UiMutableComposite.addChild(UiWidget),List.add(int, Object)
-
addChildWidget
protected void addChildWidget(UiRegularWidget child, int index)
- Parameters:
child- the child to add.index- the index where to insert the child.- See Also:
addChild(UiRegularWidget, int)
-
getValueOrThrow
public V getValueOrThrow()
- Specified by:
getValueOrThrowin interfaceUiValidatableWidget<V>- Returns:
- the current
value.
-
setValue
public void setValue(V value, boolean forUser)
- Specified by:
setValuein interfaceAttributeWriteValueForUser<V>- Specified by:
setValuein interfaceUiValidatableWidget<V>- Overrides:
setValuein classFxActiveValidatableWidget<W extends javafx.scene.layout.Pane,V>- Parameters:
value- the newvalue.forUser- -trueforUiValidatableWidget.setValueForUser(Object)andfalseforUiValidatableWidget.setValue(Object).
-
-