Class AbstractChoiceProperty

  • All Implemented Interfaces:
    PropertyVisitorAcceptor, java.lang.Cloneable
    Direct Known Subclasses:
    ChoiceProperty

    @OpenApiAll
    public class AbstractChoiceProperty
    extends Property
    Extracted more common class for Choice editing
    • Field Detail

      • choice

        private java.util.List choice
        The list of possible values.
      • valuesTranslatable

        private boolean valuesTranslatable
        True, if values of this property must be translated with resource provider.
      • editableValue

        private boolean editableValue
        If property is editable, then value can be selected not just from the list, but entered the new one.
      • undefinedStateAvailable

        private boolean undefinedStateAvailable
        Undefined state is available if lower value of multiplicity is zero
    • Constructor Detail

      • AbstractChoiceProperty

        public AbstractChoiceProperty()
      • AbstractChoiceProperty

        public AbstractChoiceProperty​(java.lang.String id,
                                      @CheckForNull
                                      java.lang.Object value)
    • Method Detail

      • setEditableValue

        public void setEditableValue​(boolean editable)
        Sets the editable flag.. If property is editable, then value can be selected not just from the list, but entered the new one.
        Parameters:
        editable - the editable state of the property.
      • isEditableValue

        public boolean isEditableValue()
        Returns editable flag.
        Returns:
        the editable flag.
      • getChoice

        public java.util.List getChoice()
        Returns list of possible values.
        Returns:
        list of possible values.
      • setChoice

        public void setChoice​(java.util.List val)
        Sets the list of possible values for selecting. Sets only mMaximum number of values from the List's beginning.
        Parameters:
        val - a new possible values list.
      • isValuesTranslatable

        public boolean isValuesTranslatable()
        Returns:
        true, if values of this property must be translated with property's resource provider
      • setValuesTranslatable

        public void setValuesTranslatable​(boolean valuesTranslatable)
        Set true, if values of this property must be translated with property's resource provider.
        Parameters:
        valuesTranslatable - the new value of this flag.
      • clone

        public AbstractChoiceProperty clone()
        Description copied from class: Property
        Clones the property. Clone is not deep, the clone will have the same instance of value. The clone will not have registered PropertyChangeListeners.
        Overrides:
        clone in class Property
        Returns:
        the cloned property.
      • isUndefinedStateAvailable

        public boolean isUndefinedStateAvailable()
      • setUndefinedStateAvailable

        public void setUndefinedStateAvailable​(boolean undefinedStateAvailable)