Class AbstractPropertyOptionsGroup
java.lang.Object
com.nomagic.magicdraw.core.options.OptionsGroup
com.nomagic.magicdraw.core.options.AbstractPropertyOptionsGroup
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
AbstractDiagramLayouterOptionsGroup,com.nomagic.magicdraw.core.options.VersionedOptionsGroup
Manages editing of properties as options in an application.
- See Also:
-
Field Summary
Fields inherited from class com.nomagic.magicdraw.core.options.OptionsGroup
ICON_ENVIRONMENT_OPTIONS -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPropertyOptionsGroup(PropertyManager propertyManager) Constructs property options group.Constructs property options group.AbstractPropertyOptionsGroup(String id, PropertyManager propertyManager, boolean visible) Constructs property options group. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInvisibleProperty(Property property) Adds a property which is invisible to the user.voidaddProperty(Property property) Adds property to this group.voidaddProperty(Property property, boolean generateDescription) Adds property to this group.voidaddProperty(Property property, String descriptionID) Adds property with given descriptionID.protected voidafterLoad(com.nomagic.magicdraw.lic.MDVersion version, boolean pluginsLoaded) protected voidafterLoadAdditionalAction(boolean pluginsLoaded) voidbeforeLoad(boolean pluginsLoaded) protected AbstractPropertyOptionsGroupclone()final PropertyManagerCreates default values for properties.Creates a property manager for the group.com.nomagic.magicdraw.ui.dialogs.options.BaseOptionsPanelCreates options panel for editing the properties.protected voidfixProperty(String propertyID, Runnable runnable) getCopy()Gets properties managed by options.getProperty(String name) Gets property by name.Gets properties which are visible to the user.protected booleanvoidloadOptions(Style style, boolean pluginsLoaded) voidremoveProperty(String name) Removes a property by name.voidSets default values for the properties contained in this group.protected voidsetOptions(PropertyManager propertyManager) Sets properties for options.voidsetPropertiesInvisible(String[] ids, boolean invisible) Sets visibility flag for an array of properties.voidsetPropertyInvisible(String id, boolean invisible) Changes visibility flag to the property.Methods inherited from class com.nomagic.magicdraw.core.options.OptionsGroup
add, afterSave, canDisplay, firstInit, getBanner, getChildren, getGroupIcon, getIcon, getId, getModelingLanguage, getName, getParent, isEnabled, isVisible, remove, resetCachedValues, setEnabled, setVisible, sortChildren
-
Constructor Details
-
AbstractPropertyOptionsGroup
@OpenApi public AbstractPropertyOptionsGroup(String id, @CheckForNull PropertyManager propertyManager, boolean visible) Constructs property options group.- Parameters:
id- id of the group.propertyManager- property options managed by this group.visible- indicates if group is visible to the user.
-
AbstractPropertyOptionsGroup
Constructs property options group.- Parameters:
propertyManager- property options managed by this group.
-
AbstractPropertyOptionsGroup
Constructs property options group.- Parameters:
id- id of the group.
-
-
Method Details
-
createDefault
Creates default values for properties.- Returns:
- property manager with properties having default values.
-
createOptions
Creates a property manager for the group.- Returns:
- created property manager.
-
setDefaultValues
@OpenApi public void setDefaultValues()Sets default values for the properties contained in this group. Overriding classes should set default values to the properties. -
createOptionsPanel
public com.nomagic.magicdraw.ui.dialogs.options.BaseOptionsPanel createOptionsPanel()Description copied from class:OptionsGroupCreates options panel for editing the properties.- Specified by:
createOptionsPanelin classOptionsGroup- Returns:
- created options panel.
-
getOptions
Gets properties managed by options.- Returns:
- properties managed by options.
-
getVisibleOptions
Gets properties which are visible to the user.- Returns:
- properties which are visible to the user.
-
hasVisibleOptions
protected boolean hasVisibleOptions() -
getOptionsToSave
- Overrides:
getOptionsToSavein classOptionsGroup
-
loadOptions
- Overrides:
loadOptionsin classOptionsGroup
-
afterLoad
protected void afterLoad(com.nomagic.magicdraw.lic.MDVersion version, boolean pluginsLoaded) - Overrides:
afterLoadin classOptionsGroup
-
afterLoadAdditionalAction
protected void afterLoadAdditionalAction(boolean pluginsLoaded) -
beforeLoad
public void beforeLoad(boolean pluginsLoaded) - Overrides:
beforeLoadin classOptionsGroup
-
setOptions
Sets properties for options.- Parameters:
propertyManager- property manager to set.
-
getProperty
Gets property by name.- Parameters:
name- name of the property.- Returns:
- property found by name.
-
addProperty
Adds property to this group. DescriptionID will be reset. To add property with description useaddProperty(Property, String)method.- Parameters:
property- property to be added.
-
addProperty
Adds property to this group. Property description ID will be generated or reset depending on generateDescription parameter value. If generateDescription = true, standard description resource ID will be generated by MagicDraw. If generateDescription = false, description ID will be set to null. To add property with its own description ID useaddProperty(Property, String)method- Parameters:
property- property to add.generateDescription- true if description for property must be generated. Otherwise, description ID will be reset.
-
addProperty
Adds property with given descriptionID.- Parameters:
property- property to be added.descriptionID- descriptionID for property.
-
addInvisibleProperty
Adds a property which is invisible to the user.- Parameters:
property- property to add.
-
removeProperty
Removes a property by name.- Parameters:
name- name by which to remove the property.
-
setPropertyInvisible
Changes visibility flag to the property.- Parameters:
id- id of the property for which to change visibility.invisible- visibility flag value.
-
setPropertiesInvisible
Sets visibility flag for an array of properties.- Parameters:
ids- ids of properties for which to change visibility flag.invisible- visibility flag value.
-
clone
- Overrides:
clonein classOptionsGroup
-
getCopy
-
fixProperty
-