Module io.github.mmm.ui.api.core
Class UiCustomInput<V,W extends UiInput<V>>
- java.lang.Object
-
- io.github.mmm.ui.api.widget.AbstractUiWidget
-
- io.github.mmm.ui.api.widget.AbstractUiCustomWidget<W>
-
- io.github.mmm.ui.api.widget.input.UiCustomValuedWidget<V,W>
-
- io.github.mmm.ui.api.widget.input.UiCustomValidatableWidget<V,W>
-
- io.github.mmm.ui.api.widget.input.UiCustomInput<V,W>
-
- All Implemented Interfaces:
EventSource<UiEvent,UiEventListener>
,AttributeReadEnabled
,AttributeReadId
,AttributeReadValid
,AttributeReadValue<V>
,AttributeReadVisible
,AttributeWriteEnabled
,AttributeWriteId
,AttributeWritePrefix
,AttributeWriteReadOnly
,AttributeWriteSuffix
,AttributeWriteTooltip
,AttributeWriteValidationFailure
,AttributeWriteValue<V>
,AttributeWriteValueForUser<V>
,AttributeWriteVisible
,UiAbstractInput<V>
,UiInput<V>
,UiCustomWidget<W>
,UiRegularWidget
,UiWidget
,UiValidatableWidget<V>
,UiValuedWidget<V>
- Direct Known Subclasses:
UiCustomCompositeInput
public class UiCustomInput<V,W extends UiInput<V>> extends UiCustomValidatableWidget<V,W> implements UiInput<V>
- Since:
- 1.0.0
-
-
Field Summary
-
Fields inherited from class io.github.mmm.ui.api.widget.AbstractUiCustomWidget
delegate
-
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.input.UiInput
STYLE_INPUT
-
Fields inherited from interface io.github.mmm.ui.api.widget.value.UiValidatableWidget
STYLE_MANDATORY
-
-
Constructor Summary
Constructors Constructor Description UiCustomInput(W delegate)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UiRegularWidget
getContainerWidget()
String
getName()
UiLabel
getNameWidget()
String
getPrefix()
String
getSuffix()
String
getTooltip()
boolean
hasContainerWidget()
boolean
hasNameWidget()
void
setName(String name)
void
setPrefix(String prefix)
void
setSuffix(String suffix)
void
setTooltip(String tooltip)
-
Methods inherited from class io.github.mmm.ui.api.widget.input.UiCustomValidatableWidget
getOriginalValue, getValidationFailure, getValidator, getValueOrThrow, setOriginalValue, setValidationFailure, setValidationFailure, setValidator, setValue
-
Methods inherited from class io.github.mmm.ui.api.widget.input.UiCustomValuedWidget
getValue, setValue
-
Methods inherited from class io.github.mmm.ui.api.widget.AbstractUiCustomWidget
addListener, dispose, doInitialize, getDelegate, getDelegate, getId, getParent, getReadOnlyFixed, getStyles, initialize, isDisposed, isEnabled, isReadOnly, isVisible, removeListener, setEnabled, setId, setParent, setReadOnly, setReadOnlyFixed, setVisible, 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.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.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, setVisible, validate, validate, validate, validateDown, validateUp
-
-
-
-
Method Detail
-
getTooltip
public String getTooltip()
- Specified by:
getTooltip
in interfaceAttributeWriteTooltip
- Overrides:
getTooltip
in classAbstractUiCustomWidget<W extends UiInput<V>>
- Returns:
- the text of this object. It is a brief description that explains this object to the end-user. Will be the
empty
String
if no tooltip is specified.
-
setTooltip
public void setTooltip(String tooltip)
- Specified by:
setTooltip
in interfaceAttributeWriteTooltip
- Overrides:
setTooltip
in classAbstractUiCustomWidget<W extends UiInput<V>>
- Parameters:
tooltip
- is the new value ofAttributeWriteTooltip.getTooltip()
.
-
getName
public String getName()
- Specified by:
getName
in interfaceUiAbstractInput<V>
- Returns:
- the
label text
for thename widget
or the title of the form group.
-
setName
public void setName(String name)
- Specified by:
setName
in interfaceUiAbstractInput<V>
- Parameters:
name
- the newname
. Prevents lazy initialization of thename widget
.
-
hasNameWidget
public boolean hasNameWidget()
- Specified by:
hasNameWidget
in interfaceUiInput<V>
- Returns:
true
if thename widget
has already been created,false
otherwise. Helpful to avoid unintended lazy initialization.
-
getNameWidget
public UiLabel getNameWidget()
- Specified by:
getNameWidget
in interfaceUiInput<V>
- Returns:
- the
UiLabel
of this input. May be lazily created on the first call of this method to avoid unnecessary overhead (e.g. if aUiInput
is used for inline editing).
-
hasContainerWidget
public boolean hasContainerWidget()
- Specified by:
hasContainerWidget
in interfaceUiInput<V>
- Returns:
true
if thecontainer widget
has already been created,false
otherwise. Helpful to avoid unintended lazy initialization.
-
getContainerWidget
public UiRegularWidget getContainerWidget()
- Specified by:
getContainerWidget
in interfaceUiInput<V>
- Returns:
- the
UiRegularWidget
containing both thename widget
and the actual input widget. Will be lazily created on the first call of this method.
-
getPrefix
public String getPrefix()
- Specified by:
getPrefix
in interfaceAttributeWritePrefix
- Returns:
- the optional prefix text shown in front of the actual input (e.g. for a currency like $ or £). Will be
null
if not set.
-
setPrefix
public void setPrefix(String prefix)
- Specified by:
setPrefix
in interfaceAttributeWritePrefix
- Parameters:
prefix
- the newprefix
.
-
getSuffix
public String getSuffix()
- Specified by:
getSuffix
in interfaceAttributeWriteSuffix
- Returns:
- the optional suffix text shown after of the actual input (e.g. for a unit, currencies like €, etc.). Will
be
null
if not set.
-
setSuffix
public void setSuffix(String suffix)
- Specified by:
setSuffix
in interfaceAttributeWriteSuffix
- Parameters:
suffix
- the newsuffix
.
-
-