public interface InputComponent<IMPLTYPE,VALUETYPE> extends MutableFaceted<HintsFacet>
Modifier and Type | Method and Description |
---|---|
IMPLTYPE |
addValidator(UIValidator validator)
Add a new
UIValidator with which this InputComponent should be validated. |
org.jboss.forge.furnace.spi.ListenerRegistration<ValueChangeListener> |
addValueChangeListener(ValueChangeListener listener)
Listens for changes in the value of this input
|
String |
getDescription()
Return a few sentences describing the purpose of this
InputComponent . |
String |
getLabel()
Return the label for this
InputComponent . |
String |
getName()
Return the name of this
InputComponent . |
String |
getRequiredMessage()
Return the message to be displayed when this
InputComponent is required and no primary or default value
has been set. |
char |
getShortName()
Return the single character abbreviation representing this
InputComponent . |
Set<UIValidator> |
getValidators()
Return the current
UIValidator with which this InputComponent should be validated. |
Object |
getValue()
Returns the value associated with this component.
|
Converter<String,VALUETYPE> |
getValueConverter()
Get the current
Converter instance with which this InputComponent value should be converted to and
from String form. |
Class<VALUETYPE> |
getValueType()
Return the
Class type of this InputComponent . |
boolean |
hasDefaultValue()
Return
true if this InputComponent has been supplied with a default value. |
boolean |
hasValue()
Return
true if the primary value of this InputComponent has been set. |
boolean |
isEnabled()
Return
true if this InputComponent is enabled, and should be displayed in the user interface. |
boolean |
isRequired()
Return
true if a value or default value of this InputComponent must be set before the
UICommand to which it belongs may be executed. |
IMPLTYPE |
setDescription(Callable<String> description)
Set a few sentences describing the purpose of this
InputComponent . |
IMPLTYPE |
setDescription(String description)
Set a few sentences describing the purpose of this
InputComponent . |
IMPLTYPE |
setEnabled(boolean b)
Set this
InputComponent to be enabled. |
IMPLTYPE |
setEnabled(Callable<Boolean> callable)
Set the
Callable object to supply the value when isEnabled() is called. |
IMPLTYPE |
setLabel(String label)
Set the label for this
InputComponent . |
IMPLTYPE |
setRequired(boolean required)
Set this
InputComponent to be a required input. |
IMPLTYPE |
setRequired(Callable<Boolean> required)
Set the
Callable object to supply the value when isRequired() is called. |
IMPLTYPE |
setRequiredMessage(Callable<String> message)
Set the
Callable object to supply the message to be displayed when this InputComponent is required
and no primary or default value has been set. |
IMPLTYPE |
setRequiredMessage(String message)
Set the message to be displayed when this
InputComponent is required and no primary or default value has
been set. |
IMPLTYPE |
setValueConverter(Converter<String,VALUETYPE> converter)
Set the current
Converter instance with which this InputComponent value should be converted to and
from String form |
void |
validate(UIValidationContext context)
Validate the current
UIInput . |
install, register, uninstall, unregister
getFacet, getFacets, getFacets, hasAllFacets, hasAllFacets, hasFacet, supports
String getLabel()
InputComponent
. This is typically used when displaying inputs in more graphical
layouts, or when a short description of the input is required.String getName()
InputComponent
. This is typically used for text-based interactions, and may be
canonicalized by the UIProvider
implementation.String getDescription()
InputComponent
.Class<VALUETYPE> getValueType()
Class
type of this InputComponent
.boolean hasDefaultValue()
true
if this InputComponent
has been supplied with a default value.boolean hasValue()
true
if the primary value of this InputComponent
has been set. (If true
any default value will be ignored.) If a default value has been provided, this method will still return
false
if no primary value has been set.boolean isEnabled()
true
if this InputComponent
is enabled, and should be displayed in the user interface.boolean isRequired()
true
if a value or default value of this InputComponent
must be set before the
UICommand
to which it belongs may be executed.String getRequiredMessage()
InputComponent
is required and no primary or default value
has been set.char getShortName()
InputComponent
. This is typically used for
hot-keys or text-based shorthand flags in non-graphical user interfaces.Set<UIValidator> getValidators()
UIValidator
with which this InputComponent
should be validated.IMPLTYPE setEnabled(boolean b)
InputComponent
to be enabled.IMPLTYPE setEnabled(Callable<Boolean> callable)
Callable
object to supply the value when isEnabled()
is called.IMPLTYPE setLabel(String label)
InputComponent
. This is typically used when displaying inputs in more graphical
layouts, or when a short description of the input is required.IMPLTYPE setDescription(String description)
InputComponent
.IMPLTYPE setDescription(Callable<String> description)
InputComponent
.IMPLTYPE setRequired(boolean required)
InputComponent
to be a required input.IMPLTYPE setRequired(Callable<Boolean> required)
Callable
object to supply the value when isRequired()
is called.IMPLTYPE setRequiredMessage(String message)
InputComponent
is required and no primary or default value has
been set.IMPLTYPE setRequiredMessage(Callable<String> message)
Callable
object to supply the message to be displayed when this InputComponent
is required
and no primary or default value has been set.Converter<String,VALUETYPE> getValueConverter()
Converter
instance with which this InputComponent
value should be converted to and
from String
form.IMPLTYPE setValueConverter(Converter<String,VALUETYPE> converter)
Converter
instance with which this InputComponent
value should be converted to and
from String
formIMPLTYPE addValidator(UIValidator validator)
UIValidator
with which this InputComponent
should be validated.Object getValue()
null
is returnedorg.jboss.forge.furnace.spi.ListenerRegistration<ValueChangeListener> addValueChangeListener(ValueChangeListener listener)
void validate(UIValidationContext context)
UIInput
.validator
- the UIValidationContext
object that holds validation errorsCopyright © 2015 JBoss by Red Hat. All rights reserved.