Package com.nomagic.magicdraw.properties
Class FontProperty
- java.lang.Object
-
- com.nomagic.magicdraw.properties.Property
-
- com.nomagic.magicdraw.properties.FontProperty
-
- All Implemented Interfaces:
PropertyVisitorAcceptor,java.lang.Cloneable
@OpenApiAll public class FontProperty extends Property
The property for storing and editing somejava.awt.Fontvalue.- See Also:
Font
-
-
Field Summary
-
Fields inherited from class com.nomagic.magicdraw.properties.Property
DEFAULT_PROPERTY_RESOURCE_PROVIDER, EDITABLE, NULL, NULL_ID_PROPERTY_RESOURCE_PROVIDER, UNDEFINED, VALUE
-
-
Constructor Summary
Constructors Constructor Description FontProperty()Default constructor.FontProperty(java.lang.String id, java.awt.Font value)The property constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(PropertyVisitor v)Accepts the given visitor.FontPropertyclone()Clones the property.java.lang.StringgetClassType()Returns property class type.java.awt.FontgetFont()Returns value as file.static java.lang.StringgetStringRepresentation(java.awt.Font f)java.lang.StringgetValueStringRepresentation()Returns value's string representation.-
Methods inherited from class com.nomagic.magicdraw.properties.Property
_getValue, _isFrozen, _setFrozen, _setValue, addPropertyChangeListener, addSource, addSources, areValuesEqual, checkFrozen, checkFrozen, createCellEditor, createTableCellRenderer, equals, firePropertyChange, generateDefaultDescriptionID, getAdditionalProperties, getAdditionalProperty, getDescription, getDescriptionID, getFirstElementFromSources, getGroup, getID, getIntroductoryVersion, getName, getNonEditableReason, getProjectFromSourcesOrActive, getPureDescription, getResourceProvider, getResourceProviderID, getSourceAsElement, getSources, getSourcesAsStream, getUndefinedString, getUndefinedString, getValue, hashCode, isEditable, isUndefinedState, isValueCompatible, removePropertyChangeListener, setAdditionalProperties, setAdditionalProperty, setDescription, setDescriptionID, setEditable, setGroup, setID, setIntroductoryVersion, setNonEditableReason, setResourceProvider, setResourceProviderID, setSources, setUndefinedState, setValue, toString
-
-
-
-
Constructor Detail
-
FontProperty
public FontProperty()
Default constructor. Value of the property will be null. ID will be empty string.
-
FontProperty
public FontProperty(java.lang.String id, java.awt.Font value)The property constructor.- Parameters:
id- the ID of property.value- the font value of the property.
-
-
Method Detail
-
getValueStringRepresentation
public java.lang.String getValueStringRepresentation()
Returns value's string representation.- Overrides:
getValueStringRepresentationin classProperty- Returns:
- string representation of the value - "font name font style font size".
-
getStringRepresentation
public static java.lang.String getStringRepresentation(java.awt.Font f)
-
accept
public void accept(PropertyVisitor v) throws java.lang.Exception
Accepts the given visitor.- Specified by:
acceptin interfacePropertyVisitorAcceptor- Overrides:
acceptin classProperty- Parameters:
v- the PropertyVisitor.- Throws:
java.lang.Exception
-
getFont
public java.awt.Font getFont()
Returns value as file.- Returns:
- property value(file object).
-
getClassType
public java.lang.String getClassType()
Returns property class type.- Specified by:
getClassTypein interfacePropertyVisitorAcceptor- Overrides:
getClassTypein classProperty- Returns:
- PropertyID.FONT_PROPERTY
- See Also:
PropertyID.FONT_PROPERTY
-
clone
public FontProperty 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.
-
-