Package org.apache.myfaces.custom.schedule

Examples of org.apache.myfaces.custom.schedule.HtmlPlanner


        if (!component.isRendered())
        {
            return;
        }

        HtmlPlanner planner = (HtmlPlanner) component;
        ResponseWriter writer = context.getResponseWriter();
       
        //determine the CSS file for the chosen theme
        String theme = getTheme(planner);
        if (theme == null || theme.length() < 1) theme = "default";
        String css = "css/" + theme + ".css";
       
        //add needed CSS and Javascript files to the header

        AddResource.addStyleSheet(HtmlPlanner.class, css,
                context);
        AddResource.addJavaScriptToHeader(HtmlPlanner.class,
                "javascript/alphaAPI.js", context);
        AddResource.addJavaScriptToHeader(HtmlPlanner.class,
                "javascript/domLib.js", context);
        AddResource.addJavaScriptToHeader(HtmlPlanner.class,
                "javascript/domTT.js", context);
        AddResource.addJavaScriptToHeader(HtmlPlanner.class,
                "javascript/fadomatic.js", context);


        int numberOfRows = planner.getModel().numberOfEntities();

        int gridHeight = (numberOfRows * 22) + 3 + 47;

        writer.startElement(HTML.DIV_ELEM, planner);
        writer.writeAttribute(HTML.CLASS_ATTR, "planner", null);
View Full Code Here


        if (!component.isRendered())
        {
            return;
        }

        HtmlPlanner planner = (HtmlPlanner) component;
        ResponseWriter writer = context.getResponseWriter();

        for (Iterator entityIterator = planner.getModel().entityIterator(); entityIterator
                .hasNext();)
        {
            PlannerEntity entity = (PlannerEntity) entityIterator.next();
            writer.startElement(HTML.TR_ELEM, planner);
            writer.startElement(HTML.TD_ELEM, planner);
            writer.writeAttribute(HTML.CLASS_ATTR, "gutter", null);
            writer.startElement(HTML.DIV_ELEM, planner);
            writer.writeAttribute(HTML.STYLE_ATTR, "height: 1px; width: "
                    + String.valueOf(getGutterWidth(planner))
                    + "px", null);
            writer.endElement(HTML.DIV_ELEM);
            writer.endElement(HTML.TD_ELEM);

            int numberOfDays = planner.getModel().numberOfDays();
            float columnWidth = (numberOfDays == 0) ? 100f
                    : (100 / numberOfDays);

            for (Iterator dayIterator = planner.getModel().dayIterator(); dayIterator
                    .hasNext();)
            {
                Day day = (Day) dayIterator.next();
                writer.startElement(HTML.TD_ELEM, planner);
                writer.writeAttribute(HTML.CLASS_ATTR, "row", null);
View Full Code Here

        if (!component.isRendered())
        {
            return;
        }

        HtmlPlanner planner = (HtmlPlanner) component;
        ResponseWriter writer = context.getResponseWriter();
        writeForegroundEnd(context, planner, writer);
        writer.endElement(HTML.DIV_ELEM);
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.custom.schedule.HtmlPlanner

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.