@OpenApiAll public class StyleManager extends java.lang.Object implements PropertyVisitorAcceptor, java.beans.PropertyChangeListener, java.lang.Cloneable, com.nomagic.magicdraw.core.project.options.PersistentStyleManager
| Modifier and Type | Class and Description |
|---|---|
static interface |
StyleManager.StyleListener
Listener for style events.
|
| Constructor and Description |
|---|
StyleManager()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PropertyVisitor visitor)
Accepts the given visitor.
|
void |
addStyle(Style style)
Adds given style.
|
static void |
addStyleListener(StyleManager.StyleListener listener)
Adds static listener for listen style event.
|
java.lang.Object |
clone()
Makes a copy of this manager.
|
static void |
fireStyleAdded(StyleManager manager,
Style style) |
java.lang.String |
getClassType()
Returns property class type.
|
Style |
getDefaultStyle()
Returns default style.
|
java.util.List<Style> |
getOrderedStyles()
Returns styles ordered by names.
|
Style |
getStyle(java.lang.String name)
Returns style with the specified name.
|
Style |
getStyleByID(StyleManager styleManager,
java.lang.String id) |
java.util.List<Style> |
getStyles()
Returns all styles of this manager.
|
void |
propertyChange(java.beans.PropertyChangeEvent e)
Listens to PropertyNames.STYLE_MANAGER property change event.
|
void |
removeStyle(Style style)
Removes given style.
|
static void |
removeStyleListener(StyleManager.StyleListener listener)
Removes listener for listen style creation event.
|
void |
setDefaultStyle(Style style)
Sets default style for this manager.
|
void |
setStyles(java.util.Collection<Style> styles)
Sets all styles.
|
public void addStyle(Style style)
style - the style to add.public void removeStyle(Style style)
style - the style to remove.@CheckForNull public Style getDefaultStyle()
public Style getStyle(java.lang.String name)
name - style name.@CheckForNull public Style getStyleByID(StyleManager styleManager, @CheckForNull java.lang.String id)
public void setDefaultStyle(@CheckForNull
Style style)
style - - the style to be default.public java.util.List<Style> getStyles()
public java.util.List<Style> getOrderedStyles()
public void setStyles(java.util.Collection<Style> styles)
styles - a collection of new styles.public void accept(PropertyVisitor visitor) throws java.lang.Exception
accept in interface PropertyVisitorAcceptorvisitor - the PropertyVisitor.java.lang.Exceptionpublic java.lang.String getClassType()
getClassType in interface PropertyVisitorAcceptorPropertyID.STYLE_MANAGERpublic void propertyChange(java.beans.PropertyChangeEvent e)
StyleManager from new value and sets all styles from
this manager to itself.propertyChange in interface java.beans.PropertyChangeListenere - the property change event.public java.lang.Object clone()
clone in class java.lang.Objectpublic static void fireStyleAdded(StyleManager manager, Style style)
public static void addStyleListener(StyleManager.StyleListener listener)
listener - Listener to be added.public static void removeStyleListener(StyleManager.StyleListener listener)
listener - Listener to be removed.