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 ofUiCompositeInput
for 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 void
addChild(UiRegularWidget child, int index)
Inserts the givenchild
at the givenindex
.protected void
addChildWidget(UiRegularWidget child, int index)
UiRegularWidget
getChild(int index)
int
getChildCount()
int
getChildIndex(UiRegularWidget child)
V
getValueOrThrow()
void
initBinding(UiValueBinding<V> newBinding)
Initializes the value binding.UiRegularWidget
removeChild(int index)
This method removes the child at the givenindex
from this panel.protected void
removeChildWidget(UiRegularWidget child, int index)
void
setValue(V value, boolean forUser)
protected void
setValueNative(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:UiBindableWidget
Initializes the value binding.- Specified by:
initBinding
in interfaceUiBindableWidget<V>
- Parameters:
newBinding
- theUiValueBinding
defining how to read and write the value.
-
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interfaceUiComposite<V>
- Returns:
- the number of direct children contained in this widget.
-
getChild
public UiRegularWidget getChild(int index)
- Specified by:
getChild
in interfaceUiComposite<V>
- Parameters:
index
- is the index of the requested child. Should be in the range from0
to
.UiComposite.getChildCount()
- 1- Returns:
- the requested child or
null
if no such child exists. - See Also:
List.get(int)
-
getChildIndex
public int getChildIndex(UiRegularWidget child)
- Specified by:
getChildIndex
in interfaceUiComposite<V>
- Parameters:
child
- thechild
to look for.- Returns:
- the index of the given
child
or-1
if no suchchild
exists.
-
removeChild
public UiRegularWidget removeChild(int index)
Description copied from interface:UiRemovableComposite
This method removes the child at the givenindex
from this panel.- Specified by:
removeChild
in interfaceUiRemovableComposite<V>
- Parameters:
index
- is theindex
of the child to remove. It has to be in the range from0
to
.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:UiMutableComposite
Inserts the givenchild
at the givenindex
.- Specified by:
addChild
in interfaceUiMutableComposite<V>
- Parameters:
child
- is theUiWidget
to add as child of this composite.index
- is theindex
of the new child. It has to be in the range from0
toUiComposite.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:
getValueOrThrow
in interfaceUiValidatableWidget<V>
- Returns:
- the current
value
.
-
setValue
public void setValue(V value, boolean forUser)
- Specified by:
setValue
in interfaceAttributeWriteValueForUser<V>
- Specified by:
setValue
in interfaceUiValidatableWidget<V>
- Overrides:
setValue
in classFxActiveValidatableWidget<W extends javafx.scene.layout.Pane,V>
- Parameters:
value
- the newvalue
.forUser
- -true
forUiValidatableWidget.setValueForUser(Object)
andfalse
forUiValidatableWidget.setValue(Object)
.
-
-