Package org.openfaces.component.panel

Examples of org.openfaces.component.panel.TabbedPane


        setStringProperty(component, "rolloverClass");

        setStringProperty(component, "rolloverContainerStyle");
        setStringProperty(component, "rolloverContainerClass");

        TabbedPane tabbedPane = (TabbedPane) component;

        setEnumerationProperty(component, "tabAlignment", TabAlignment.class);
        setEnumerationProperty(component, "tabPlacement", TabPlacement.class);
        setStringProperty(component, "tabStyle");
        setStringProperty(component, "rolloverTabStyle");
        setStringProperty(component, "selectedTabStyle");
        setStringProperty(component, "focusedTabStyle");
        setStringProperty(component, "rolloverSelectedTabStyle");
        setStringProperty(component, "tabEmptySpaceStyle");
        setStringProperty(component, "frontBorderStyle");
        setStringProperty(component, "backBorderStyle");
        setStringProperty(component, "tabClass");
        setStringProperty(component, "rolloverTabClass");
        setStringProperty(component, "selectedTabClass");
        setStringProperty(component, "focusedTabClass");
        setStringProperty(component, "rolloverSelectedTabClass");
        setStringProperty(component, "tabEmptySpaceClass");

        setBooleanProperty(component, "focusable");
        setStringProperty(component, "focusAreaClass");
        setStringProperty(component, "focusAreaStyle");
        setStringProperty(component, "disabledStyle");
        setStringProperty(component, "disabledClassStyle");

        String onselectionchange = getPropertyValue("onselectionchange");
        if (!setAsValueExpressionIfPossible(component, "onselectionchange", onselectionchange))
            tabbedPane.setOnchange(onselectionchange);
        setBooleanProperty(component, "mirrorTabSetVisible");
    }
View Full Code Here


        return Styles.mergeClassNames(super.getDefaultClassName(), "o_debug");
    }

    public void createSubComponents(FacesContext context, UIComponent component) {
        Debug debug = (Debug) component;
        TabbedPane tabbedPane = (TabbedPane) Components.createChildComponent(context, debug, TabbedPane.COMPONENT_TYPE, "pages");
        tabbedPane.setLoadingMode(LoadingMode.CLIENT);
        tabbedPane.setStyle("width: 100%; height: 100%;");

        tabbedPane.getChildren().add(new SubPanel(
                Components.createOutputText(context, "Console"),
                createLogPageContent(context, debug)
        ));
        DataTable elementProperties = (DataTable) Components.createChildComponent(
                context, debug, DataTable.COMPONENT_TYPE, "elementProperties");
        tabbedPane.getChildren().add(new SubPanel(
                Components.createOutputText(context, "Element Inspector"),
                elementProperties
        ));
        elementProperties.setStyle("width: 100%; height: 100%;");
        elementProperties.getChildren().add(new Scrolling());
View Full Code Here

    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        if (AjaxUtil.getSkipExtraRenderingOnPortletsAjax(context))
            return;
        ResponseWriter writer = context.getResponseWriter();
        TabbedPane tabbedPane = (TabbedPane) component;

        LoadingMode loadingMode = tabbedPane.getLoadingMode();
        if (LoadingMode.AJAX_LAZY.equals(loadingMode) || LoadingMode.AJAX_ALWAYS.equals(loadingMode))
            AjaxUtil.prepareComponentForAjax(context, component);

        List<SubPanel> allSubPanels = tabbedPane.getSubPanels(true);

        // implementation note for one who is going to remove outer table rendering
        // need to check, that style="padding: 10px;" (10px for example) do not breaks border under IE
        // JSFC-754 TabbedPane border is not solid if set paddings
        writer.startElement("table", tabbedPane);
        writer.writeAttribute("border", "0", null);
        writer.writeAttribute("cellspacing", "0", null);
        writer.writeAttribute("cellpadding", "0", null);
        writer.writeAttribute("id", tabbedPane.getClientId(context), "id");

        Rendering.writeComponentClassAttribute(writer, tabbedPane);

        Rendering.writeStandardEvents(writer, tabbedPane);

        TabPlacement tabPlacement = getTabPlacement(tabbedPane);

        boolean horizontalPlacement = TabPlacement.LEFT.equals(tabPlacement) || TabPlacement.RIGHT.equals(tabPlacement);
        boolean paneFirst = TabPlacement.RIGHT.equals(tabPlacement) || TabPlacement.BOTTOM.equals(tabPlacement);
        writer.startElement("tr", tabbedPane);
        writer.startElement("td", tabbedPane);
        writer.writeAttribute("height", "100%", null);
        writer.writeAttribute("width", "100%", null);

        writer.startElement("table", tabbedPane);
        writer.writeAttribute("border", "0", null);
        writer.writeAttribute("cellspacing", "0", null);
        writer.writeAttribute("cellpadding", "0", null);
        writer.writeAttribute("height", "100%", null);
        writer.writeAttribute("width", "100%", null);
        writer.startElement("tr", tabbedPane);
        writer.startElement("td", tabbedPane);

        String containerClass = getContainerClass(context, tabbedPane);
        String rolloverContainerClass = Styles.getCSSClass(context,
                tabbedPane, tabbedPane.getRolloverContainerStyle(), StyleGroup.regularStyleGroup(), tabbedPane.getRolloverContainerClass());

        if (paneFirst) {
            if (tabbedPane.isMirrorTabSetVisible()) {
                encodeTabSet(context, tabbedPane, allSubPanels, true);
                writer.endElement("td");
                if (!horizontalPlacement) {
                    writer.endElement("tr");
                    writer.startElement("tr", tabbedPane);
                }
                writer.startElement("td", tabbedPane);
            }
            encodePane(context, tabbedPane, allSubPanels, containerClass);
        } else {
            encodeTabSet(context, tabbedPane, allSubPanels, false);
        }
        writer.endElement("td");
        if (!horizontalPlacement) {
            writer.endElement("tr");
            writer.startElement("tr", tabbedPane);
        }
        writer.startElement("td", tabbedPane);
        if (paneFirst) {
            encodeTabSet(context, tabbedPane, allSubPanels, false);
        } else {
            encodePane(context, tabbedPane, allSubPanels, containerClass);
            if (tabbedPane.isMirrorTabSetVisible()) {
                writer.endElement("td");
                if (!horizontalPlacement) {
                    writer.endElement("tr");
                    writer.startElement("tr", tabbedPane);
                }
View Full Code Here

TOP

Related Classes of org.openfaces.component.panel.TabbedPane

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.