Class AbstractChoiceProperty

java.lang.Object
com.nomagic.magicdraw.properties.Property
com.nomagic.magicdraw.properties.AbstractChoiceProperty
All Implemented Interfaces:
PropertyVisitorAcceptor, Cloneable
Direct Known Subclasses:
ChoiceProperty

@OpenApiAll public class AbstractChoiceProperty extends Property
Extracted more common class for Choice editing
  • Constructor Details

    • AbstractChoiceProperty

      public AbstractChoiceProperty()
    • AbstractChoiceProperty

      public AbstractChoiceProperty(String id, @CheckForNull Object value)
  • Method Details

    • 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 List getChoice()
      Returns list of possible values.
      Returns:
      list of possible values.
    • setChoice

      public void setChoice(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)