public class StyleDefinition extends MetadataDefinitionBase implements IStyleDefinition
MXML styles are defined by [Style] metadata on ActionScript
class declarations.
After a style definition is in the symbol table, it should always be accessed
through the read-only IStyleDefinition interface.
FLAG_CAST_FUNCTION, FLAG_CONSTRUCTOR, FLAG_CONTINGENT, FLAG_DECLARED_IN_CONTROL_FLOW, FLAG_DEFAULT, FLAG_DEPRECATED, FLAG_DYNAMIC, FLAG_FINAL, FLAG_GENERATED_EMBED_CLASS, FLAG_HAS_INIT, FLAG_IMPLICIT, FLAG_NATIVE, FLAG_OVERRIDE, FLAG_REST, FLAG_STATIC, flags, nodeRef, singletonEmptyMetaTags| Constructor and Description |
|---|
StyleDefinition(String name,
IClassDefinition decoratedDefinition) |
| Modifier and Type | Method and Description |
|---|---|
String |
getArrayType()
Gets the value of this style's
arrayType attribute. |
String[] |
getEnumeration()
Gets the possible values of this style, as specified by
its
enumeration attribute. |
String |
getFormat()
Gets the value of this style's
format attribute. |
String |
getInherit()
Gets the value of this style's
inherit attribute. |
String |
getMaxValue()
Gets the value of this style's
maxValue attribute. |
String |
getMaxValueExclusive()
Gets the value of this style's
maxValueExclusive attribute. |
String |
getMinValue()
Gets the value of this style's
minValue attribute. |
String |
getMinValueExclusive()
Gets the value of this style's
minValueExclusive attribute. |
IStyleTagNode |
getNode()
Returns the
IDefinitionNode from which this definition was
created, if the definition came from the AST for a source file. |
String[] |
getStates()
Gets the value of this style's
states attribute. |
String[] |
getThemes()
Gets the value of this style's
themes attribute. |
boolean |
isColor()
Determines whether this style represents a color.
|
boolean |
isInheriting()
Determines whether this style is inheriting.
|
ITypeDefinition |
resolveArrayType(ICompilerProject project)
Resolves the type specified by the
arrayType attribute
to a class or interface definitions. |
void |
setArrayType(String arrayType) |
void |
setEnumeration(String[] enumeration)
Sets the value of the
enumeration attribute. |
void |
setFormat(String format)
Sets the value of the
format attribute. |
void |
setInherit(String inherit)
Sets the value of the
inherit attribute. |
void |
setMaxValue(String maxValue)
Sets the value of the
maxValue attribute. |
void |
setMaxValueExclusive(String maxValueExclusive)
Sets the value of the
maxValueExclusive attribute. |
void |
setMinValue(String minValue)
Sets the value of the
minValue attribute. |
void |
setMinValueExclusive(String minValueExclusive)
Sets the value of the
minValueExclusive attribute. |
void |
setStates(String[] states)
Sets the value of the
states attribute. |
void |
setThemes(String themes)
Sets a list of theme names separated by comma or spaces.
|
getAttributes, getAttributeValue, getDecoratedDefinition, getDecoratedDefinitionNode, getDeprecatedMessage, getDeprecatedReplacement, getDeprecatedSince, getEnd, getStart, getTagName, getTagNode, matchesaddMetaTag, buildInnerString, buildString, getAbsoluteEnd, getAbsoluteStart, getAllMetaTags, getAncestorOfType, getArrayElementType, getBaseName, getBindableEventNames, getColumn, getContainingASScope, getContainingFilePath, getContainingScope, getContainingSourceFilePath, getDefinition, getDeprecationInfo, getExplicitSourceComment, getFileScope, getFileSpecification, getInstanceType, getLine, getLocationString, getMaxSize, getMetaTagByName, getMetaTagsByName, getMName, getModifiers, getNameColumn, getNameEnd, getNameLine, getNamespaceReference, getNamespaceReferenceAsString, getNameStart, getPackageName, getParent, getPercentProxy, getQualifiedName, getSize, getSkinPart, getSourcePath, getStorageName, getTypeAsDisplayString, getTypeDependencyType, getTypeReference, hasCollapseWhiteSpace, hasExplicitComment, hasMetaTagByName, hasModifier, hasNamespace, hasRichTextContent, inPackageNamespace, isBindable, isBindableStyle, isColor, isContingent, isContingentNeeded, isDeprecated, isDynamic, isEmpty, isFinal, isGeneratedEmbedClass, isImplicit, isInProject, isInternal, isNative, isOverride, isPrivate, isProtected, isPublic, isRequiredSkinPart, isStatic, isTopLevelDefinition, resolveNamespace, resolveType, resolveType, resolveType, resolveType, resolveType, setBindable, setContainingScope, setContingent, setDynamic, setFinal, setGeneratedEmbedClass, setImplicit, setLocation, setMetaTags, setModifier, setNameLocation, setNamespaceReference, setNative, setNode, setOverride, setPublic, setStatic, setTypeReference, toStorageName, toString, unsetOverride, verifyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDecoratedDefinition, getDeprecatedMessage, getDeprecatedReplacement, getDeprecatedSincegetExplicitSourceComment, hasExplicitCommentgetAbsoluteEnd, getAbsoluteStart, getAllMetaTags, getAncestorOfType, getBaseName, getBindableEventNames, getColumn, getContainingFilePath, getContainingScope, getContainingSourceFilePath, getDeprecationInfo, getEnd, getLine, getMetaTagByName, getMetaTagsByName, getModifiers, getNameColumn, getNameEnd, getNameLine, getNamespaceReference, getNameStart, getPackageName, getParent, getQualifiedName, getSourcePath, getStart, getTypeAsDisplayString, getTypeReference, hasMetaTagByName, hasModifier, hasNamespace, isBindable, isBindableStyle, isContingent, isContingentNeeded, isDeprecated, isDynamic, isFinal, isGeneratedEmbedClass, isImplicit, isInProject, isInternal, isNative, isOverride, isPrivate, isProtected, isPublic, isStatic, resolveNamespace, resolveTypepublic StyleDefinition(String name, IClassDefinition decoratedDefinition)
public IStyleTagNode getNode()
IDefinitionIDefinitionNode from which this definition was
created, if the definition came from the AST for a source file.
This method may require the AST to be reloaded or regenerated and therefore may be slow.
More specific definition interfaces such as IClassDefinition
redeclare this method to return a more specific node interface such as
IClassNode.
getNode in interface IDefinitiongetNode in interface IStyleDefinitiongetNode in class DefinitionBasepublic String getArrayType()
IStyleDefinitionarrayType attribute.
When the type attribute is "Array,
the arrayType attribute specifies the type
of the array elements.
getArrayType in interface IStyleDefinitionarrayType attribute as a String,
or null.public void setArrayType(String arrayType)
public ITypeDefinition resolveArrayType(ICompilerProject project)
IStyleDefinitionarrayType attribute
to a class or interface definitions.
When the value of the type attribute is "Array",
the arrayType attribute specifies the type
of the array elements.
resolveArrayType in interface IStyleDefinitionproject - The ICompilerProject within which references
should be resolved.ITypeDefinition for the resolved array type,
or null.public String[] getEnumeration()
IStyleDefinitionenumeration attribute.
When the value of the type attribute is "String",
the enumeration attribute specifies the allowed String values.
getEnumeration in interface IStyleDefinitionenumeration
attribute as an array of Strings, or an empty array.public void setEnumeration(String[] enumeration)
enumeration attribute.enumeration - The enumerated values as an array of Strings.public String getFormat()
IStyleDefinitionformat attribute.getFormat in interface IStyleDefinitionformat attribute as a String,
or null.public void setFormat(String format)
format attribute.format - The value as a String.public boolean isColor()
IStyleDefinitionisColor in interface IStyleDefinitiontrue if the value of the format
attribute is "Color".public String getInherit()
IStyleDefinitioninherit attribute.getInherit in interface IStyleDefinitioninherit attribute as a String,
or null.public void setInherit(String inherit)
inherit attribute.inherit - The value as a String.public boolean isInheriting()
IStyleDefinitionisInheriting in interface IStyleDefinitiontrue if the value of the inherit
attribute is "yes".public String[] getStates()
IStyleDefinitionstates attribute.getStates in interface IStyleDefinitionstates attribute
as an array of Strings, or an empty array.public void setStates(String[] states)
states attribute.states - The state names as an array of Strings.public String[] getThemes()
IStyleDefinitionthemes attribute.getThemes in interface IStyleDefinitionthemes attribute
as an array of Strings, or an empty array.public void setThemes(String themes)
themes - Comma-separated or space-separated theme names.public String getMinValue()
IStyleDefinitionminValue attribute.getMinValue in interface IStyleDefinitionminValue attribute as a String,
or null.public void setMinValue(String minValue)
minValue attribute.minValue - The value as a String.public String getMinValueExclusive()
IStyleDefinitionminValueExclusive attribute.getMinValueExclusive in interface IStyleDefinitionminValueExclusive attribute as a String,
or null.public void setMinValueExclusive(String minValueExclusive)
minValueExclusive attribute.minValueExclusive - The value as a String.public String getMaxValue()
IStyleDefinitionmaxValue attribute.getMaxValue in interface IStyleDefinitionmaxValue attribute as a String,
or null.public void setMaxValue(String maxValue)
maxValue attribute.maxValue - The value as a String.public String getMaxValueExclusive()
IStyleDefinitionmaxValueExclusive attribute.getMaxValueExclusive in interface IStyleDefinitionmaxValueExclusive attribute as a String,
or null.public void setMaxValueExclusive(String maxValueExclusive)
maxValueExclusive attribute.maxValueExclusive - The value as a String.Copyright © 2016 The Apache Software Foundation. All rights reserved.