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,CronProperty,DateProperty,DoubleProperty,IntegerProperty,LocalDateProperty,LocalDateTimeProperty,LongProperty,ObjectMultipleProperty,ObjectProperty,StringProperty,TaskProperty,UserProperty
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 StringNULL_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 com.vaadin.flow.component.button.ButtongetAccept()abstract com.vaadin.flow.component.AbstractFieldgetAdvancedEditor()An advanced editor for the propertyabstract StringgetAsString()The value to be displayed on screencom.vaadin.flow.component.button.ButtongetCancel()abstract TgetDefaultValue()StringgetDescription()StringgetDisplayName()abstract com.vaadin.flow.component.AbstractFieldgetInplaceEditor()A simple field that will be used to edit the propertyStringgetName()StringgetType()TgetValue()booleanhasBinder()booleanisMandatory()booleanisReadOnly()booleanisUnique()voidsetAccept(com.vaadin.flow.component.button.Button accept)voidsetCancel(com.vaadin.flow.component.button.Button cancel)voidsetDescription(String description)voidsetDisplayName(String displayName)voidsetHasBinder(boolean hasBinder)voidsetMandatory(boolean mandatory)voidsetName(String name)voidsetReadOnly(boolean readOnly)voidsetType(String type)voidsetUnique(boolean unique)voidsetValue(T value)abstract booleansupportsAdvancedEditor()Does it support an advanced editor? If trueabstract booleansupportsInplaceEditor()Does it support in place editor? If trueStringtoString()
-
-
-
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
-
getAccept
public com.vaadin.flow.component.button.Button getAccept()
-
setAccept
public void setAccept(com.vaadin.flow.component.button.Button accept)
-
getCancel
public com.vaadin.flow.component.button.Button getCancel()
-
setCancel
public void setCancel(com.vaadin.flow.component.button.Button cancel)
-
-