Package com.gargoylesoftware.htmlunit.javascript.host

Examples of com.gargoylesoftware.htmlunit.javascript.host.Stylesheet


     * Returns the media types that the imported CSS style sheet applies to.
     * @return the media types that the imported CSS style sheet applies to
     */
    public MediaList jsxGet_media() {
        if (media_ == null) {
            final Stylesheet parent = this.jsxGet_parentStyleSheet();
            final org.w3c.dom.stylesheets.MediaList ml = getImportRule().getMedia();
            media_ = new MediaList(parent, ml);
        }
        return media_;
    }
View Full Code Here


     * Returns the style sheet referred to by this rule.
     * @return the style sheet referred to by this rule
     */
    public Stylesheet jsxGet_styleSheet() {
        if (importedStylesheet_ == null) {
            final Stylesheet owningSheet = this.jsxGet_parentStyleSheet();
            final HTMLElement ownerNode = owningSheet.jsxGet_ownerNode();
            final CSSStyleSheet importedStylesheet = getImportRule().getStyleSheet();
            importedStylesheet_ = new Stylesheet(ownerNode, importedStylesheet, owningSheet.getUri());
        }
        return importedStylesheet_;
    }
View Full Code Here

     * @param index where to insert the sheet in the collection
     * @return the newly created stylesheet
     */
    public Stylesheet jsxFunction_createStyleSheet(final String url, final int index) {
        // minimal implementation
        final Stylesheet stylesheet = new Stylesheet();
        stylesheet.setPrototype(getPrototype(Stylesheet.class));
        stylesheet.setParentScope(getWindow());
        return stylesheet;
    }
View Full Code Here

        final Cache cache = getWindow().getWebWindow().getWebClient().getCache();
        final CSSStyleSheet cached = cache.getCachedStyleSheet(css);
        final String uri = getDomNodeOrDie().getPage().getWebResponse().getRequestSettings()
        .getUrl().toExternalForm();
        if (cached != null) {
            sheet_ = new Stylesheet(this, cached, uri);
        }
        else {
            final InputSource source = new InputSource(new StringReader(css));
            sheet_ = new Stylesheet(this, source, uri);
            cache.cache(css, sheet_.getWrappedSheet());
        }

        return sheet_;
    }
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.javascript.host.Stylesheet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.