public abstract class AbstractGomFormElement extends AbstractGomElement implements GomFormElement, GomCheckable, LineBreakable
For using an extended language information container when subclassing,
the extended container must subclass DefaultGomLangInfos
and
override getLangInfos()
!
GomCheckable.Context
Constructor and Description |
---|
AbstractGomFormElement() |
Modifier and Type | Method and Description |
---|---|
boolean |
allowsEmpty()
Indicates that empty values are allowed.
|
boolean |
breaks()
Indicates, that the form shall be followed by a line break.
|
protected AbstractGomFormElement |
clone() |
ConvertEntity |
convertEntities()
Get the mode for converting unicode characters.
|
String |
description(String lang)
Resolve the description for the given language or fallback.
|
boolean |
fillsHorizontally()
Indicates, that the form shall be filled horizontally.
|
YesNo |
getAllowEmpty()
Indicates, whether leaving the form empty is allowed.
|
ConvertEntity |
getConvertEntities() |
EditorValue<?> |
getDefaultValue()
Get the default value for the form element.
|
YesNo |
getHFill() |
YesNo |
getHidden()
Indicates, whether the component will be hidden or shown.
|
String |
getLabel()
Deprecated.
since 4.0.17 originally replaced by LangInfos-Tag, now for hiding in GOM and enable attribute to tag conversion.
|
DefaultGomLangInfos |
getLangInfos()
Get the container of language information stored for this
element.
|
Designator |
getName()
Get the name identifying the editor's value.
|
YesNo |
getNoBreak() |
Preset |
getPreset()
Get the mode to be applied for fallback values.
|
YesNo |
getUseLanguages() |
boolean |
isHidden()
Indicator for hidden elements.
|
String |
label(String lang)
Returns the forms name instead of a
null label. |
String |
name()
Get the name of this form element.
|
Preset |
preset()
Get the preset mode to be used.
|
void |
setAllowEmpty(YesNo allowEmpty)
Set, whether leaving the form empty is allowed.
|
void |
setConvertEntities(ConvertEntity convertEntities) |
void |
setDefaultValue(EditorValue<?> editorValue)
Set the default value for the form element.
|
void |
setHFill(YesNo hfill) |
void |
setHidden(YesNo hidden)
Set, whether the form will be hidden.
|
void |
setLabel(String label)
Deprecated.
since 4.0.17 originally replaced by LangInfos-Tag, now for hiding in GOM and enable attribute to tag conversion.
|
void |
setLabelAndDescription(String lang,
String label,
String description) |
void |
setName(Designator name)
Set the name that identifies the editor's value.
|
void |
setNoBreak(YesNo noBreak) |
void |
setPreset(Preset preset)
Set the mode to be applied for fallback values.
|
void |
setUseLanguages(YesNo useLanguages) |
boolean |
usesLanguages()
Indicates, that the form element uses languages.
|
void |
validate()
Validate the class for being correctly set up.
|
void |
validate(GomCheckable.Context context)
Validate the element against the given context.
|
void |
verify()
Verify the element to be fulfill its syntactic constraints.
|
getDefaultTag, getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
public Designator getName()
GomFormElement
getName
in interface GomFormElement
public void setName(Designator name)
GomFormElement
setName
in interface GomFormElement
name
- The name.public ConvertEntity getConvertEntities()
public void setConvertEntities(ConvertEntity convertEntities)
public YesNo getHFill()
public void setHFill(YesNo hfill)
public YesNo getUseLanguages()
public void setUseLanguages(YesNo useLanguages)
public YesNo getNoBreak()
public void setNoBreak(YesNo noBreak)
public YesNo getAllowEmpty()
GomFormElement
getAllowEmpty
in interface GomFormElement
public void setAllowEmpty(YesNo allowEmpty)
GomFormElement
setAllowEmpty
in interface GomFormElement
allowEmpty
- Indicator for allowing emptiness.public YesNo getHidden()
GomFormElement
getHidden
in interface GomFormElement
true
, if to be hidden.public void setHidden(YesNo hidden)
GomFormElement
setHidden
in interface GomFormElement
hidden
- Indicator for the element being hidden.public Preset getPreset()
GomFormElement
getPreset
in interface GomFormElement
public void setPreset(Preset preset)
GomFormElement
setPreset
in interface GomFormElement
preset
- The preset mode to be used.public DefaultGomLangInfos getLangInfos()
GomLangInfoProvider
getLangInfos
in interface GomLangInfoProvider
public void validate() throws IllegalStateException
validate
in interface GomElement
IllegalStateException
- If the instance is in an illegal state.public void verify() throws IllegalStateException
GomCheckable
verify
in interface GomCheckable
IllegalStateException
- If the element is not correctly set up.public void validate(GomCheckable.Context context) throws GomValidationError
GomCheckable
validate
in interface GomCheckable
context
- The context to validate for.GomValidationError
- If the element is not plausible wrt. its context.protected AbstractGomFormElement clone()
public EditorValue<?> getDefaultValue()
GomFormElement
getDefaultValue
in interface GomFormElement
public void setDefaultValue(EditorValue<?> editorValue)
GomFormElement
setDefaultValue
in interface GomFormElement
editorValue
- The value container.@NotNull public String name()
GomFormElement
name
in interface GomFormElement
public ConvertEntity convertEntities()
GomFormElement
convertEntities
in interface GomFormElement
ConvertEntity
mode.public boolean fillsHorizontally()
GomFormElement
fillsHorizontally
in interface GomFormElement
true
, iff to be filled.public boolean usesLanguages()
GomFormElement
usesLanguages
in interface GomFormElement
true
, iff it uses languages.public boolean breaks()
GomFormElement
breaks
in interface GomFormElement
breaks
in interface LineBreakable
false
, iff it shall not break.public boolean allowsEmpty()
GomFormElement
allowsEmpty
in interface GomFormElement
true
, if empty values are allowed.public boolean isHidden()
GomHideable
isHidden
in interface GomHideable
true
, if the element should be hidden.public Preset preset()
GomFormElement
preset
in interface GomFormElement
public String label(String lang)
null
label.label
in interface GomLangInfoProvider
lang
- The language abbreviation.GomLangInfoProvider.label(String)
public String description(String lang)
GomLangInfoProvider
description
in interface GomLangInfoProvider
lang
- The langauge abbreviation.public final void setLabelAndDescription(@NotNull String lang, @Nullable String label, @Nullable String description)
@Deprecated public String getLabel()
@Deprecated public void setLabel(String label)
Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408