Package org.openfaces.component.timetable

Examples of org.openfaces.component.timetable.ScrollButton


    }

    private void renderExpandedDayView(FacesContext context, MonthTable monthTable) throws IOException{
        UIComponent header = monthTable.getExpandedDayViewHeader();
        if (header == null ){
            header = new ScrollButton(ScrollDirection.UP);
            header.setParent(monthTable);
        }
        UIComponent footer = monthTable.getExpandedDayViewFooter();
        if (footer == null ){
            footer = new ScrollButton(ScrollDirection.DOWN);
            footer.setParent(monthTable);
        }
        String expandDayViewId = monthTable.getClientId(context) + EXPANDED_VIEW_SUFFIX;
        ResponseWriter writer = context.getResponseWriter();
        writer.startElement("div", monthTable);
View Full Code Here


        encodeButton(context, component);
    }

    protected void encodeButton(FacesContext context, UIComponent component) throws IOException {
        FacesContext currentInstance = FacesContext.getCurrentInstance();
        ScrollButton scrollButton = (ScrollButton) component;
        ResponseWriter writer = context.getResponseWriter();

        writeIdAttribute(context,scrollButton);
        writer.startElement("div", scrollButton);
        writer.writeAttribute("class", Styles.getCSSClass(context, scrollButton, scrollButton.getButtonStyle(), StyleGroup.regularStyleGroup(),
                scrollButton.getButtonClass(), getDefaultScrollButtonClass()), null);
        writer.writeAttribute("nowrap", "nowrap", null);
        writer.writeAttribute("align", "center", null);
        writer.writeAttribute("valign", "middle", null);

        String imageUrl;
        String buttonImageUrl = (String) scrollButton.getAttributes().get("buttonImageUrl");
        if (scrollButton.getScrollDirection().equals(ScrollDirection.UP))
            imageUrl = Resources.getURL(context, buttonImageUrl, null, "input/scrollButtonUp.gif");
        else
            imageUrl = Resources.getURL(context, buttonImageUrl, null, "input/scrollButtonDown.gif");
        writer.startElement("img", scrollButton);
        writeIdAttribute(context,scrollButton);
View Full Code Here

TOP

Related Classes of org.openfaces.component.timetable.ScrollButton

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.