Class OptionModel

  • All Implemented Interfaces:
    io.ultreia.java4all.config.ConfigOptionDef, Serializable

    public class OptionModel
    extends Object
    implements io.ultreia.java4all.config.ConfigOptionDef
    le modele d'une option de la configuration a editer.
    Since:
    2.5.11
    Author:
    tchemit
    See Also:
    Serialized Form
    • Field Detail

      • def

        protected final io.ultreia.java4all.config.ConfigOptionDef def
        la definition de l'option (venant de la config)
      • valid

        protected boolean valid
        un drapeau pour savoir si l'option est valide (n'est pas utilisé actuellement)
      • saved

        protected boolean saved
        un drapeau pour savoir si l'option a été sauvée
      • originalValue

        protected Object originalValue
        la valeur non modifié de l'option
      • value

        protected Object value
        la valeur actuelle de l'option (peut être la valeur orignal si non modifée)
      • propertyName

        protected String propertyName
        le nom de la propriété javaBean (peut etre null, si option sans support javaBean)
      • shortLabel

        protected String shortLabel
        Une description courte à utiliser à la place de la clef i18n.
        Since:
        2.5.29
      • editor

        protected TableCellEditor editor
        l'editeur utilise pour modifier graphiquement l'option
      • renderer

        protected TableCellRenderer renderer
        le renderer utilise pour afficher graphiquement l'option
    • Constructor Detail

      • OptionModel

        protected OptionModel​(io.ultreia.java4all.config.ConfigOptionDef def,
                              Object value)
    • Method Detail

      • getShortLabel

        public String getShortLabel()
      • setShortLabel

        public void setShortLabel​(String shortLabel)
      • getKey

        public String getKey()
        Specified by:
        getKey in interface io.ultreia.java4all.config.ConfigOptionDef
      • getType

        public Class<?> getType()
        Specified by:
        getType in interface io.ultreia.java4all.config.ConfigOptionDef
      • isArrayType

        public boolean isArrayType()
      • getDescription

        public String getDescription()
        Specified by:
        getDescription in interface io.ultreia.java4all.config.ConfigOptionDef
      • getDefaultValue

        public String getDefaultValue()
        Specified by:
        getDefaultValue in interface io.ultreia.java4all.config.ConfigOptionDef
      • isTransient

        public boolean isTransient()
        Specified by:
        isTransient in interface io.ultreia.java4all.config.ConfigOptionDef
      • isFinal

        public boolean isFinal()
        Specified by:
        isFinal in interface io.ultreia.java4all.config.ConfigOptionDef
      • getOriginalValue

        public Object getOriginalValue()
      • getValue

        public Object getValue()
      • setDefaultValue

        public void setDefaultValue​(String defaultValue)
        Specified by:
        setDefaultValue in interface io.ultreia.java4all.config.ConfigOptionDef
      • setTransient

        public void setTransient​(boolean isTransient)
        Specified by:
        setTransient in interface io.ultreia.java4all.config.ConfigOptionDef
      • setFinal

        public void setFinal​(boolean isFinal)
        Specified by:
        setFinal in interface io.ultreia.java4all.config.ConfigOptionDef
      • setValue

        public void setValue​(Object value)
      • isModified

        public boolean isModified()
      • isValid

        public boolean isValid()
      • setValid

        public void setValid​(boolean valid)
      • isSaved

        public boolean isSaved()
      • setSaved

        public void setSaved​(boolean saved)
      • initValue

        public void initValue​(Object originalValue)
      • getPropertyName

        public String getPropertyName()
      • setPropertyName

        protected void setPropertyName​(String propertyName)
      • toString

        public String toString​(Object value)
        Get a string value of the given value considered as a value of this option, means if option is array type, then we will decorate the value as a array.
        Parameters:
        value - value to decorate
        Returns:
        decorated value
        Since:
        2.5.14