|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.preprocess.css.Style
public class Style
Represents a CSS-style-definition.
Copyright Enough Software 2004 - 2011
history
01-Mar-2004 - rob creation
| Constructor Summary | |
|---|---|
Style(String selector,
String styleName,
boolean isDynamic,
String parent,
CssBlock cssBlock)
|
|
Style(Style style)
Creates a new Style. |
|
| Method Summary | |
|---|---|
void |
add(CssBlock cssBlock)
Adds the given CSS declarations to this style. |
void |
add(Style style)
Adds another style to this one. |
void |
addAttribute(String attributeName,
String attributeValue)
Adds the specified attribute to this style |
void |
addGroup(String groupName,
AttributesGroup group)
Adds a group to this style. |
void |
addReferencedStyle(Style referencedStyle)
Adds a referenced style. |
String |
getAbbreviation()
Retrieves the abbreviation of this style. |
String |
getAttributeValue(String attributeName)
Retrieves the value for a given named attribute. |
CssDeclarationBlock[] |
getDeclarationBlocksEndingWith(String attributeBlockEnding)
Gets all CSS declaration blocks ending with the specified name. |
String[] |
getDefinedAttributes(Device device)
Retrieves the names of all defined attributes of this style. |
AttributesGroup |
getGroup(String groupName)
Retrieves the group with the specified name. |
String[] |
getGroupNames()
Retrieves the names of all stored groups. |
String |
getParentName()
|
String[] |
getReferencedStyleNames(CssAttributesManager attributesManager)
Retrieves the names of styles which are referenced by the this style. |
Style[] |
getReferencedStyles()
|
String |
getSelector()
Retrieves the name of this style. |
String |
getStyleName()
|
String |
getValue(String groupName,
String key)
Retrieves a value from the specified group |
boolean |
hasReferences()
|
boolean |
isDynamic()
|
boolean |
isReferenced()
|
boolean |
referencesStyle(String styleSelector)
Checks if the specified style is referenced by this style |
CssDeclarationBlock[] |
removeDeclarationBlocksEndingWith(String attributeBlockEnding)
Extracts all CSS declaration blocks ending with the specified name. |
AttributesGroup |
removeGroup(String groupName)
Removes the group with the specified name from this style. |
void |
removeReferences(CssDeclarationBlock block)
Removes references in the CSS groups for the given block |
void |
setAbbreviation(String abbreviation)
Sets the abbreviation of this style. |
void |
setHasReferences(boolean hasReferences)
|
void |
setIsReferenced(boolean isReferenced)
|
void |
setParent(Style parent)
Sets all style declarations of the parent. |
void |
setSelector(String selector)
Changes the selector of this style. |
String |
toString()
Creates String representation of this style. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Style(String selector,
String styleName,
boolean isDynamic,
String parent,
CssBlock cssBlock)
public Style(Style style)
style - the base style.| Method Detail |
|---|
public String getParentName()
public void setParent(Style parent)
parent - the parent of this style.public boolean referencesStyle(String styleSelector)
styleSelector - the selector of the possibly referenced style
public void add(CssBlock cssBlock)
cssBlock - the CSS declarationspublic void add(Style style)
style - the stylepublic AttributesGroup getGroup(String groupName)
groupName - the name of the group
public AttributesGroup removeGroup(String groupName)
groupName - the name of the group
public String[] getGroupNames()
public String getSelector()
public void setSelector(String selector)
selector - the new selector
public void addGroup(String groupName,
AttributesGroup group)
groupName - the name of the groupgroup - the grouppublic String toString()
toString in class Objectpublic boolean isDynamic()
public String getStyleName()
public String[] getDefinedAttributes(Device device)
device - the current device
public String getAbbreviation()
public void setAbbreviation(String abbreviation)
abbreviation - the new abbreviation of this stylepublic String[] getReferencedStyleNames(CssAttributesManager attributesManager)
attributesManager - the attribute manager
public void setIsReferenced(boolean isReferenced)
public boolean isReferenced()
public void setHasReferences(boolean hasReferences)
public boolean hasReferences()
public void addReferencedStyle(Style referencedStyle)
referencedStyle - the style which is referenced by this stylepublic Style[] getReferencedStyles()
public String getAttributeValue(String attributeName)
attributeName - the name of the attribute
public void addAttribute(String attributeName,
String attributeValue)
attributeName - the attribute nameattributeValue - the valuepublic CssDeclarationBlock[] getDeclarationBlocksEndingWith(String attributeBlockEnding)
attributeBlockEnding - the desired ending, e.g. "-animation"
public CssDeclarationBlock[] removeDeclarationBlocksEndingWith(String attributeBlockEnding)
attributeBlockEnding - the desired ending, e.g. "-animation"
public void removeReferences(CssDeclarationBlock block)
block - the CSS declaration block
public String getValue(String groupName,
String key)
groupName - the name of the group, e.g. "background"key - the attribute key, e.g. "type"
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||