/** * Returns the type of the rule. * @return the type of the rule. */ public short jsxGet_type() { return rule_.getType(); }
/** * Returns the parsable textual representation of the rule. * This reflects the current state of the rule and not its initial value. * @return the parsable textual representation of the rule. */ public String jsxGet_cssText() { return rule_.getCssText(); }
/** * If this rule is contained inside another rule (e.g. a style rule inside an @media block), * this is the containing rule. If this rule is not nested inside any other rules, this returns <code>null</code>. * @return the parent rule */ public CSSRule jsxGet_parentRule() { final org.w3c.dom.css.CSSRule parentRule = rule_.getParentRule(); if (parentRule != null) { return CSSRule.create(stylesheet_, parentRule); } return null; }
switch (rule.getType()) { case STYLE_RULE: return new CSSStyleRule(stylesheet, (org.w3c.dom.css.CSSStyleRule) rule); + " is not yet supported; rule content: '" + rule.getCssText() + "'"); break; default: LOG.warn("CSSRule " + rule.getClass().getName() + " is not yet supported; rule content: '" + rule.getCssText() + "'");
/** * Sets the parsable textual representation of the rule. * @param cssText the parsable textual representation of the rule */ public void jsxSet_cssText(final String cssText) { rule_.setCssText(cssText); }
/** * Sets the parsable textual representation of the rule. * @param cssText the parsable textual representation of the rule */ public void jsxSet_cssText(final String cssText) { rule_.setCssText(cssText); }
/** * Returns the type of the rule. * @return the type of the rule. */ public short jsxGet_type() { return rule_.getType(); }
/** * Returns the parsable textual representation of the rule. * This reflects the current state of the rule and not its initial value. * @return the parsable textual representation of the rule. */ public String jsxGet_cssText() { return rule_.getCssText(); }
/** * Sets the parsable textual representation of the rule. * @param cssText the parsable textual representation of the rule */ public void jsxSet_cssText(final String cssText) { rule_.setCssText(cssText); }
/** * If this rule is contained inside another rule (e.g. a style rule inside an @media block), * this is the containing rule. If this rule is not nested inside any other rules, this returns <code>null</code>. * @return the parent rule */ public CSSRule jsxGet_parentRule() { final org.w3c.dom.css.CSSRule parentRule = rule_.getParentRule(); if (parentRule != null) { return CSSRule.create(stylesheet_, parentRule); } return null; }
/** * Returns the type of the rule. * @return the type of the rule. */ public short jsxGet_type() { return rule_.getType(); }
/** * Returns the parsable textual representation of the rule. * This reflects the current state of the rule and not its initial value. * @return the parsable textual representation of the rule. */ public String jsxGet_cssText() { return rule_.getCssText(); }
/** * Sets the parsable textual representation of the rule. * @param cssText the parsable textual representation of the rule */ @JsxSetter({FF, IE}) public void setCssText(final String cssText) { rule_.setCssText(cssText); }
/** * If this rule is contained inside another rule (e.g. a style rule inside an @media block), * this is the containing rule. If this rule is not nested inside any other rules, this returns <code>null</code>. * @return the parent rule */ public CSSRule jsxGet_parentRule() { final org.w3c.dom.css.CSSRule parentRule = rule_.getParentRule(); if (parentRule != null) { return CSSRule.create(stylesheet_, parentRule); } return null; }
/** * Returns the type of the rule. * @return the type of the rule. */ @JsxGetter public short getType() { return rule_.getType(); }
private void appendCSSText(CSSRule rule) { String cssText = rule.getCssText().trim(); // TODO nick - escape values if (cssText.length() != 0) { buffer.append(cssText); buffer.append(NEW_LINE); } }
/** * If this rule is contained inside another rule (e.g. a style rule inside a @media block), * this is the containing rule. If this rule is not nested inside any other rules, this returns {@code null}. * @return the parent rule */ @JsxGetter public CSSRule getParentRule() { final org.w3c.dom.css.CSSRule parentRule = rule_.getParentRule(); if (parentRule != null) { return CSSRule.create(stylesheet_, parentRule); } return null; }
/** * Creates a CSSRule according to the specified rule type. * @param stylesheet the Stylesheet of this rule * @param rule the wrapped rule * @return a CSSRule subclass according to the rule type */ public static CSSRule create(final Stylesheet stylesheet, final org.w3c.dom.css.CSSRule rule) { switch (rule.getType()) { case STYLE_RULE: return new CSSStyleRule(stylesheet, rule); case IMPORT_RULE: return new CSSImportRule(stylesheet, rule); default: throw new UnsupportedOperationException("CSSRule " + rule.getClass().getName() + " is not yet supported."); } }
/** * Returns the parsable textual representation of the rule. * This reflects the current state of the rule and not its initial value. * @return the parsable textual representation of the rule. */ @JsxGetter public String getCssText() { return rule_.getCssText(); }
/** * Creates a CSSRule according to the specified rule type. * @param stylesheet the Stylesheet of this rule * @param rule the wrapped rule * @return a CSSRule subclass according to the rule type */ public static CSSRule create(final Stylesheet stylesheet, final org.w3c.dom.css.CSSRule rule) { switch (rule.getType()) { case STYLE_RULE: return new CSSStyleRule(stylesheet, rule); case IMPORT_RULE: return new CSSImportRule(stylesheet, rule); default: throw new UnsupportedOperationException("CSSRule " + rule.getClass().getName() + " is not yet supported."); } }