Package org.apache.click.element

Examples of org.apache.click.element.CssStyle


    private void setHeadElements() {
        // Add a Css import to the Page
        getHeadElements().add(new CssImport("/general/page-head-demo.css"));

        // Add inline Css content to the Page that increases the field font-size
        getHeadElements().add(new CssStyle("#" + field.getId() + " { font-size: 18px; }"));

        // Add the JQuery library to the Page
        getHeadElements().add(new JsImport("/assets/js/jquery-1.3.2.js"));

        // Add a JQuery template which adds a 'click' listener to the link
View Full Code Here


            // Add a Css import to the Page
            headElements.add(new CssImport("/general/page-head-demo.css"));

            // Add inline Css content to the Page that increases the field font-size
            headElements.add(new CssStyle("#" + field.getId() + " { font-size: 18px; }"));

            // Add the JQuery library to the Page
            headElements.add(new JsImport("/assets/js/jquery-1.4.2.js"));

            // Add a JQuery template which adds a 'click' listener to the link
View Full Code Here

            headElements.addAll(getControlLink().getHeadElements());
        }

        String tableId = getId();
        CssStyle cssStyle = new CssStyle();
        cssStyle.setId(tableId + "_css_setup");

        if (!headElements.contains(cssStyle)) {
            boolean isDarkStyle = isDarkStyle();

            String contextPath = context.getRequest().getContextPath();
            HtmlStringBuffer buffer = new HtmlStringBuffer(300);
            buffer.append("th.sortable a {\n");
            buffer.append("background: url(");
            buffer.append(contextPath);
            buffer.append("/click/column-sortable-");
            if (isDarkStyle) {
                buffer.append("dark");
            } else {
                buffer.append("light");
            }
            buffer.append(versionIndicator);
            buffer.append(".gif)");
            buffer.append(" center right no-repeat;}\n");
            buffer.append("th.ascending a {\n");
            buffer.append("background: url(");
            buffer.append(contextPath);
            buffer.append("/click/column-ascending-");
            if (isDarkStyle) {
                buffer.append("dark");
            } else {
                buffer.append("light");
            }
            buffer.append(versionIndicator);
            buffer.append(".gif)");
            buffer.append(" center right no-repeat;}\n");
            buffer.append("th.descending a {\n");
            buffer.append("background: url(");
            buffer.append(contextPath);
            buffer.append("/click/column-descending-");
            if (isDarkStyle) {
                buffer.append("dark");
            } else {
                buffer.append("light");
            }
            buffer.append(versionIndicator);
            buffer.append(".gif)");
            buffer.append(" center right no-repeat;}");
            cssStyle.setContent(buffer.toString());
            headElements.add(cssStyle);
        }
        return headElements;
    }
View Full Code Here

TOP

Related Classes of org.apache.click.element.CssStyle

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.