Package com.nomagic.magicdraw.properties
Class LocaleProperty
java.lang.Object
com.nomagic.magicdraw.properties.Property
com.nomagic.magicdraw.properties.AbstractChoiceProperty
com.nomagic.magicdraw.properties.ChoiceProperty
com.nomagic.magicdraw.properties.LocaleProperty
- All Implemented Interfaces:
 PropertyVisitorAcceptor,Cloneable
The property for storing and editing some 
java.util.Locale
 value.- See Also:
 
- 
Field Summary
Fields inherited from class com.nomagic.magicdraw.properties.Property
DEFAULT_PROPERTY_RESOURCE_PROVIDER, EDITABLE, NULL, NULL_ID_PROPERTY_RESOURCE_PROVIDER, TO, UNDEFINED, VALUE, VALUE_ANNOTATIONS - 
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.LocaleProperty(String id, int index, List choice) The constructor.LocaleProperty(String id, Object value, List choice) The constructor. - 
Method Summary
Modifier and TypeMethodDescriptionvoidAccepts the given visitor.clone()Clones the property.Returns property class type.Return the locale.voidSets a new locale for property.voidupdateLocaleByString(String locale) Update Locale By StringvoidUpdates locale by current value.Methods inherited from class com.nomagic.magicdraw.properties.ChoiceProperty
getIndex, isAppendValue, setAppendValue, setChoice, setIndex, setValue, toStringMethods inherited from class com.nomagic.magicdraw.properties.AbstractChoiceProperty
getChoice, isEditableValue, isUndefinedStateAvailable, isValuesTranslatable, setEditableValue, setUndefinedStateAvailable, setValuesTranslatableMethods inherited from class com.nomagic.magicdraw.properties.Property
_getValue, _isFrozen, _setFrozen, _setValue, addAnnotation, addPropertyChangeListener, addSource, addSources, areEqualByValue, areValuesEqual, checkFrozen, checkFrozen, equals, firePropertyChange, generateDefaultDescriptionID, getAdditionalProperties, getAdditionalProperty, getAnnotation, getAnnotations, getDescription, getDescriptionID, getFirstElementFromSources, getGroup, getID, getIntroductoryVersion, getName, getNonEditableReason, getProjectFromSourcesOrActive, getPureDescription, getResourceProvider, getResourceProviderID, getSortableValueStringRepresentation, getSourceAsElement, getSources, getSourcesAsStream, getUndefinedString, getUndefinedString, getValue, getValueStringRepresentation, hashCode, isEditable, isUndefinedState, isValueCompatible, removeAnnotation, removePropertyChangeListener, setAdditionalProperties, setAdditionalProperty, setAnnotations, setDescription, setDescriptionID, setEditable, setGroup, setID, setIntroductoryVersion, setNonEditableReason, setResourceProvider, setResourceProviderID, setSources, setUndefinedState 
- 
Constructor Details
- 
LocaleProperty
public LocaleProperty()Default constructor. Value of the property will be null. ID will be empty string. - 
LocaleProperty
The constructor.- Parameters:
 id- the ID of property.value- the value of the property.choice- the list of possible values.
 - 
LocaleProperty
The constructor.- Parameters:
 id- the ID of property.index- the index in choice of selected value.choice- the list of possible values.
 
 - 
 - 
Method Details
- 
getLocale
Return the locale.- Returns:
 - a locale from property.
 
 - 
setLocale
Sets a new locale for property.- Parameters:
 locale- a new locale.
 - 
updateLocaleByValue
public void updateLocaleByValue()Updates locale by current value. Also updates available language list for this property from ResourceManager languages. - 
updateLocaleByString
Update Locale By String- Parameters:
 locale- Locale String.
 - 
getClassType
Returns property class type.- Specified by:
 getClassTypein interfacePropertyVisitorAcceptor- Overrides:
 getClassTypein classChoiceProperty- Returns:
 - PropertyID.LOCALE_PROPERTY
 - See Also:
 
 - 
accept
Accepts the given visitor.- Specified by:
 acceptin interfacePropertyVisitorAcceptor- Overrides:
 acceptin classChoiceProperty- Parameters:
 v- the PropertyVisitor.- Throws:
 Exception
 - 
clone
Description copied from class:PropertyClones the property. Clone is not deep, the clone will have the same instance of value. The clone will not have registered PropertyChangeListeners.- Overrides:
 clonein classChoiceProperty- Returns:
 - the cloned property.
 
 
 -