Package org.openfaces.component

Examples of org.openfaces.component.CaptionArea


    private boolean isContentPreloaded() {
        return Boolean.TRUE.equals(getAttributes().get("_contentPreloaded_"));
    }

    public void createSubComponents(FacesContext context) {
        CaptionArea captionArea = Components.getOrCreateFacet(
                context, this, CaptionArea.COMPONENT_TYPE, "_defaultButtonsArea", CaptionArea.class);
        Components.createChildComponent(context, captionArea, ExpansionToggleButton.COMPONENT_TYPE, "toggle");
    }
View Full Code Here


        return captionAreas;
    }

    protected CaptionArea getDefaultButtonsArea(ComponentWithCaption component) {
        UIComponent uiComponent = (UIComponent) component;
        CaptionArea area = (CaptionArea) uiComponent.getFacet("_defaultButtonsArea");
        if (area == null) {
            area = new CaptionArea();
            area.setAlignment(Side.RIGHT);
            uiComponent.getFacets().put("_defaultButtonsArea", area);

            FacesContext context = FacesContext.getCurrentInstance();
            createDefaultAreaButtons(context, component, area);
        }
View Full Code Here

        }
    }

    @Override
    protected CaptionArea getDefaultButtonsArea(ComponentWithCaption component) {
        CaptionArea area = super.getDefaultButtonsArea(component);

        FoldingPanel foldingPanel = (FoldingPanel) component;
        FoldingDirection foldingDirection = foldingPanel.getFoldingDirection();
        boolean horizontalFoldingDirection =
                FoldingDirection.LEFT.equals(foldingDirection) || FoldingDirection.RIGHT.equals(foldingDirection);
        boolean buttonsOnTheLeft = horizontalFoldingDirection && FoldingDirection.RIGHT.equals(foldingDirection);
        area.setAlignment(buttonsOnTheLeft ? Side.LEFT : Side.RIGHT);
        return area;
    }
View Full Code Here

TOP

Related Classes of org.openfaces.component.CaptionArea

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.