Class AbstractProperty<T>
- java.lang.Object
-
- org.neotropic.util.visual.properties.AbstractProperty<T>
-
- Type Parameters:
T
- The type of the property.
- Direct Known Subclasses:
BooleanProperty
,BusinessObjectProperty
,ColorProperty
,DateProperty
,DoubleProperty
,IntegerProperty
,LocalDateProperty
,LocalDateTimeProperty
,LongProperty
,ObjectMultipleProperty
,ObjectProperty
,StringProperty
public abstract class AbstractProperty<T> extends Object
A property in a property sheet.- Author:
- Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
-
-
Field Summary
Fields Modifier and Type Field Description static String
NULL_LABEL
-
Constructor Summary
Constructors Constructor Description AbstractProperty(String name, String displayName, String description, T value, TranslationService ts)
AbstractProperty(String name, String displayName, String description, T value, TranslationService ts, boolean readOnly)
AbstractProperty(String name, String displayName, String description, T value, TranslationService ts, boolean readOnly, boolean mandatory, boolean unique)
AbstractProperty(String name, T value, TranslationService ts)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract com.vaadin.flow.component.AbstractField
getAdvancedEditor()
An advanced editor for the propertyabstract String
getAsString()
The value to be displayed on screenabstract T
getDefaultValue()
String
getDescription()
String
getDisplayName()
abstract com.vaadin.flow.component.AbstractField
getInplaceEditor()
A simple field that will be used to edit the propertyString
getName()
String
getType()
T
getValue()
boolean
hasBinder()
boolean
isMandatory()
boolean
isReadOnly()
boolean
isUnique()
void
setDescription(String description)
void
setDisplayName(String displayName)
void
setHasBinder(boolean hasBinder)
void
setMandatory(boolean mandatory)
void
setName(String name)
void
setReadOnly(boolean readOnly)
void
setType(String type)
void
setUnique(boolean unique)
void
setValue(T value)
abstract boolean
supportsAdvancedEditor()
Does it support an advanced editor? If trueabstract boolean
supportsInplaceEditor()
Does it support in place editor? If trueString
toString()
-
-
-
Field Detail
-
NULL_LABEL
public static String NULL_LABEL
-
-
Constructor Detail
-
AbstractProperty
public AbstractProperty(String name, String displayName, String description, T value, TranslationService ts)
-
AbstractProperty
public AbstractProperty(String name, String displayName, String description, T value, TranslationService ts, boolean readOnly)
-
AbstractProperty
public AbstractProperty(String name, String displayName, String description, T value, TranslationService ts, boolean readOnly, boolean mandatory, boolean unique)
-
AbstractProperty
public AbstractProperty(String name, T value, TranslationService ts)
-
-
Method Detail
-
getName
public String getName()
-
setName
public void setName(String name)
-
getDisplayName
public String getDisplayName()
-
setDisplayName
public void setDisplayName(String displayName)
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
getValue
public T getValue()
-
getDefaultValue
public abstract T getDefaultValue()
-
setValue
public void setValue(T value)
-
hasBinder
public boolean hasBinder()
-
setHasBinder
public void setHasBinder(boolean hasBinder)
-
getType
public String getType()
-
setType
public void setType(String type)
-
isReadOnly
public boolean isReadOnly()
-
setReadOnly
public void setReadOnly(boolean readOnly)
-
isMandatory
public boolean isMandatory()
-
setMandatory
public void setMandatory(boolean mandatory)
-
isUnique
public boolean isUnique()
-
setUnique
public void setUnique(boolean unique)
-
getAdvancedEditor
public abstract com.vaadin.flow.component.AbstractField getAdvancedEditor()
An advanced editor for the property- Returns:
-
supportsAdvancedEditor
public abstract boolean supportsAdvancedEditor()
Does it support an advanced editor? If true- Returns:
-
supportsInplaceEditor
public abstract boolean supportsInplaceEditor()
Does it support in place editor? If true- Returns:
-
getInplaceEditor
public abstract com.vaadin.flow.component.AbstractField getInplaceEditor()
A simple field that will be used to edit the property- Returns:
-
getAsString
public abstract String getAsString()
The value to be displayed on screen- Returns:
- The string representation of the value of the property
-
-