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, matches
addMetaTag, 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, verify
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDecoratedDefinition, getDeprecatedMessage, getDeprecatedReplacement, getDeprecatedSince
getExplicitSourceComment, hasExplicitComment
getAbsoluteEnd, 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, resolveType
public StyleDefinition(String name, IClassDefinition decoratedDefinition)
public IStyleTagNode getNode()
IDefinition
IDefinitionNode
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 IDefinition
getNode
in interface IStyleDefinition
getNode
in class DefinitionBase
public String getArrayType()
IStyleDefinition
arrayType
attribute.
When the type
attribute is "Array
,
the arrayType
attribute specifies the type
of the array elements.
getArrayType
in interface IStyleDefinition
arrayType
attribute as a String,
or null
.public void setArrayType(String arrayType)
public ITypeDefinition resolveArrayType(ICompilerProject project)
IStyleDefinition
arrayType
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 IStyleDefinition
project
- The ICompilerProject
within which references
should be resolved.ITypeDefinition
for the resolved array type,
or null
.public String[] getEnumeration()
IStyleDefinition
enumeration
attribute.
When the value of the type
attribute is "String"
,
the enumeration
attribute specifies the allowed String values.
getEnumeration
in interface IStyleDefinition
enumeration
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()
IStyleDefinition
format
attribute.getFormat
in interface IStyleDefinition
format
attribute as a String,
or null
.public void setFormat(String format)
format
attribute.format
- The value as a String.public boolean isColor()
IStyleDefinition
isColor
in interface IStyleDefinition
true
if the value of the format
attribute is "Color"
.public String getInherit()
IStyleDefinition
inherit
attribute.getInherit
in interface IStyleDefinition
inherit
attribute as a String,
or null
.public void setInherit(String inherit)
inherit
attribute.inherit
- The value as a String.public boolean isInheriting()
IStyleDefinition
isInheriting
in interface IStyleDefinition
true
if the value of the inherit
attribute is "yes"
.public String[] getStates()
IStyleDefinition
states
attribute.getStates
in interface IStyleDefinition
states
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()
IStyleDefinition
themes
attribute.getThemes
in interface IStyleDefinition
themes
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()
IStyleDefinition
minValue
attribute.getMinValue
in interface IStyleDefinition
minValue
attribute as a String,
or null
.public void setMinValue(String minValue)
minValue
attribute.minValue
- The value as a String.public String getMinValueExclusive()
IStyleDefinition
minValueExclusive
attribute.getMinValueExclusive
in interface IStyleDefinition
minValueExclusive
attribute as a String,
or null
.public void setMinValueExclusive(String minValueExclusive)
minValueExclusive
attribute.minValueExclusive
- The value as a String.public String getMaxValue()
IStyleDefinition
maxValue
attribute.getMaxValue
in interface IStyleDefinition
maxValue
attribute as a String,
or null
.public void setMaxValue(String maxValue)
maxValue
attribute.maxValue
- The value as a String.public String getMaxValueExclusive()
IStyleDefinition
maxValueExclusive
attribute.getMaxValueExclusive
in interface IStyleDefinition
maxValueExclusive
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.