- java.lang.Object
-
- io.github.mmm.ui.api.widget.AbstractUiWidget
-
- io.github.mmm.ui.spi.widget.AbstractUiNativeWidget
-
- io.github.mmm.ui.spi.widget.AbstractUiNativeWidgetWrapper<Void>
-
- io.github.mmm.ui.test.widget.TestWidget
-
- io.github.mmm.ui.test.widget.TestActiveWidget
-
- io.github.mmm.ui.test.widget.TestActiveValidatableWidget<V>
-
- io.github.mmm.ui.test.widget.input.TestInput<V>
-
- Type Parameters:
V- type ofvalue.
- All Implemented Interfaces:
EventSource<UiEvent,UiEventListener>,AttributeReadEnabled,AttributeReadId,AttributeReadValid,AttributeReadValue<V>,AttributeReadVisible,AttributeWriteEnabled,AttributeWriteId,AttributeWritePlaceholder,AttributeWritePrefix,AttributeWriteReadOnly,AttributeWriteSuffix,AttributeWriteText,AttributeWriteTooltip,AttributeWriteValidationFailure,AttributeWriteValue<V>,AttributeWriteValueForUser<V>,AttributeWriteVisible,UiAbstractInput<V>,UiInput<V>,UiActiveWidget,UiNativeWidget,UiRegularWidget,UiWidget,UiValidatableWidget<V>,UiValuedWidget<V>,UiNativeWidgetWrapper<Void>
- Direct Known Subclasses:
TestAbstractChoice,TestSelectionInput,TestTextualInput
public abstract class TestInput<V> extends TestActiveValidatableWidget<V> implements UiInput<V>, AttributeWritePlaceholder
Implementation ofUiInputusing JavaFx.- Since:
- 1.0.0
-
-
Field Summary
-
Fields inherited from class io.github.mmm.ui.test.widget.TestWidget
focussedWidget
-
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 TestInput()The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UiRegularWidgetgetContainerWidget()StringgetName()TestLabelgetNameWidget()StringgetPlaceholder()StringgetPrefix()StringgetSuffix()booleanhasContainerWidget()booleanhasNameWidget()protected voidsetMandatory(boolean mandatory)voidsetName(String name)voidsetPlaceholder(String placeholder)voidsetPrefix(String prefix)voidsetSuffix(String suffix)voidsetVisible(boolean visible, BitMask flagMode)-
Methods inherited from class io.github.mmm.ui.test.widget.TestActiveValidatableWidget
getModificationTimestamp, getOriginalValue, getValidator, getValueOrThrow, setOriginalValue, setValidator, setValue
-
Methods inherited from class io.github.mmm.ui.test.widget.TestActiveWidget
getAccessKey, isFocused, setAccessKey, setFocused
-
Methods inherited from class io.github.mmm.ui.test.widget.TestWidget
getText, getWidget, setEnabledNative, setIdNative, setReadOnlyNative, setText, setTooltipNative, setVisibleNative
-
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, 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
getValidationFailure, setValidationFailure, 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.value.UiValidatableWidget
getOriginalValue, getValidator, getValue, getValueOrThrow, isValid, reset, setOriginalValue, setValidator, setValue, setValue, setValueForUser
-
Methods inherited from interface io.github.mmm.ui.api.widget.UiWidget
cast, dispose, getModificationTimestamp, getParent, getReadOnlyFixed, getStyles, isDisposed, isEnabled, isEnabled, isFocused, isModified, isReadOnly, isVisible, isVisible, setEnabled, setEnabled, setFocused, setReadOnly, setReadOnlyFixed, setVisible, validate, validate, validate, validateDown, validateUp
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceUiAbstractInput<V>- Returns:
- the
label textfor thename widgetor the title of the form group.
-
setName
public void setName(String name)
- Specified by:
setNamein interfaceUiAbstractInput<V>- Parameters:
name- the newname. Prevents lazy initialization of thename widget.
-
hasNameWidget
public boolean hasNameWidget()
- Specified by:
hasNameWidgetin interfaceUiInput<V>- Returns:
trueif thename widgethas already been created,falseotherwise. Helpful to avoid unintended lazy initialization.
-
getNameWidget
public TestLabel getNameWidget()
- Specified by:
getNameWidgetin interfaceUiInput<V>- Returns:
- the
UiLabelof this input. May be lazily created on the first call of this method to avoid unnecessary overhead (e.g. if aUiInputis used for inline editing).
-
hasContainerWidget
public boolean hasContainerWidget()
- Specified by:
hasContainerWidgetin interfaceUiInput<V>- Returns:
trueif thecontainer widgethas already been created,falseotherwise. Helpful to avoid unintended lazy initialization.
-
getContainerWidget
public UiRegularWidget getContainerWidget()
- Specified by:
getContainerWidgetin interfaceUiInput<V>- Returns:
- the
UiRegularWidgetcontaining both thename widgetand the actual input widget. Will be lazily created on the first call of this method.
-
getPrefix
public String getPrefix()
- Specified by:
getPrefixin interfaceAttributeWritePrefix- Returns:
- the optional prefix text shown in front of the actual input (e.g. for a currency like $ or £). Will be
nullif not set.
-
setPrefix
public void setPrefix(String prefix)
- Specified by:
setPrefixin interfaceAttributeWritePrefix- Parameters:
prefix- the newprefix.
-
getSuffix
public String getSuffix()
- Specified by:
getSuffixin interfaceAttributeWriteSuffix- Returns:
- the optional suffix text shown after of the actual input (e.g. for a unit, currencies like €, etc.). Will
be
nullif not set.
-
setSuffix
public void setSuffix(String suffix)
- Specified by:
setSuffixin interfaceAttributeWriteSuffix- Parameters:
suffix- the newsuffix.
-
setVisible
public void setVisible(boolean visible, BitMask flagMode)- Specified by:
setVisiblein interfaceUiWidget- Overrides:
setVisiblein classAbstractUiNativeWidget- Parameters:
visible-trueto show this widget (in case its parent is also visible),falseto hide this widget.flagMode- theBitMaskto apply. SeeUiVisibleFlagsfor available options.- See Also:
UiWidget.isVisible()
-
setMandatory
protected void setMandatory(boolean mandatory)
- Overrides:
setMandatoryin classTestActiveValidatableWidget<V>- Parameters:
mandatory- the mandatory (required) flag.
-
getPlaceholder
public String getPlaceholder()
- Specified by:
getPlaceholderin interfaceAttributeWritePlaceholder- Returns:
- the placeholder text that is displayed if the input text field is blank. Will be the empty string if not set.
-
setPlaceholder
public void setPlaceholder(String placeholder)
- Specified by:
setPlaceholderin interfaceAttributeWritePlaceholder- Parameters:
placeholder- the new value ofAttributeWritePlaceholder.getPlaceholder().
-
-