info.magnolia.ui.vaadin.gwt.client.layout
Class CssRule

java.lang.Object
  extended by info.magnolia.ui.vaadin.gwt.client.layout.CssRule

public class CssRule
extends Object

Utility class for fetching CSS properties from DOM StyleSheets JS object and for creating new CSS rules dynamically.


Constructor Summary
CssRule(String selector, boolean deep)
           
 
Method Summary
static CssRule create(String selector)
           
 String getProperty(String propertyName)
          Returns a specific property value from this CSS rule.
 String getSelector()
           
 void setProperty(String propertyName, String propertyValue)
          Sets a specific property value for this CSS rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CssRule

public CssRule(String selector,
               boolean deep)
Parameters:
selector - the CSS selector to search for in the stylesheets
deep - should the search follow any @import statements?
Method Detail

getProperty

public String getProperty(String propertyName)
Returns a specific property value from this CSS rule.

Parameters:
propertyName - camelCase CSS property name
Returns:
the value of the property as a String

setProperty

public void setProperty(String propertyName,
                        String propertyValue)
Sets a specific property value for this CSS rule.

Parameters:
propertyName - camelCase CSS property name
propertyValue - the value of the property as a String

getSelector

public String getSelector()

create

public static CssRule create(String selector)


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.