Package org.exoplatform.portal.webui.container

Examples of org.exoplatform.portal.webui.container.UIContainer


                toUIPortlet(uiPortlet, application);
                uiComponent = uiPortlet;
            }
        } else if (model instanceof Container) {
            Container container = (Container) model;
            UIContainer uiTempContainer;
            if (UITabContainer.TAB_CONTAINER.equals(container.getFactoryId())) {
                uiTempContainer = uiContainer.createUIComponent(context, UITabContainer.class, null, null);
            } else if (UIColumnContainer.COLUMN_CONTAINER.equals(container.getFactoryId())) {
                uiTempContainer = uiContainer.createUIComponent(context, UIColumnContainer.class, null, null);
            } else {
View Full Code Here


    public static void showComponentLayoutMode(Class clazz) {
        if (clazz == null)
            return;
        UIPortalApplication portalApp = getUIPortalApplication();
        UIEditInlineWorkspace uiEditWS = portalApp.findFirstComponentOfType(UIEditInlineWorkspace.class);
        UIContainer uiParent = null;

        UIComponent uiComponent = uiEditWS.getUIComponent();
        if (uiComponent instanceof UIPortal) {
            UIPortal uiPortal = (UIPortal) uiComponent;
            uiPortal.setMaximizedUIComponent(null);
View Full Code Here

         }
      }
      else if (model instanceof Container)
      {
         Container container = (Container)model;
         UIContainer uiTempContainer ;
         if(UITabContainer.TAB_CONTAINER.equals(container.getFactoryId()))
         {
            uiTempContainer = uiContainer.createUIComponent(context, UITabContainer.class, null, null);
         }
         else
View Full Code Here

        if (containerOptions == null) {
            return;
        }

        //
        UIContainer uicontainer = addChild(UIContainer.class, null, null);

        //
        Container container = createContainer(COLUMN_CONTAINER, null);

        //
View Full Code Here

            dashboard = service.loadDashboard(currentUIPortlet.getStorageId());
        }

        //
        if (dashboard != null) {
            UIContainer uiRoot = getChild(UIContainer.class);

            // Clear the children created by default as we get state from the storage
            uiRoot.getChildren().clear();

            // Assemble the dashboard
            PortalDataMapper.toUIContainer(uiRoot, dashboard);
        }
View Full Code Here

     * @param row index of row to add
     * @return <code>UIGadget</code> object which added in
     * @see UIGadget
     */
    public void addUIGadget(final UIGadget gadget, final int col, final int row) {
        UIContainer uiContainer = getColumn(col);
        List<UIComponent> children = uiContainer.getChildren();
        if (uiContainer == null || row < 0 || row > children.size()) {
            return;
        }
        gadget.setParent(uiContainer);
        children.add(row, gadget);
View Full Code Here

     * @param row index of row
     * @return <code>null</code> if specified position doesn't exist <code>UIGadget</code> otherwise
     * @see UIGadget
     */
    public UIGadget getUIGadget(final int col, final int row) {
        UIContainer uiContainer = getColumn(col);
        if (uiContainer == null || row < 0 || row >= uiContainer.getChildren().size()) {
            return null;
        }
        return uiContainer.getChild(row);
    }
View Full Code Here

     * @see UIGadget
     */
    public UIGadget removeUIGadget(final String gadgetId) {
        UIGadget gadget = getUIGadget(gadgetId);
        if (gadget != null) {
            UIContainer uiContainer = gadget.getParent();
            gadget.setParent(null);
            uiContainer.getChildren().remove(gadget);
        }
        return gadget;
    }
View Full Code Here

    public UIDashboardContainer setColumns(final int num) throws Exception {
        if (num < 1 || num > MAX_COLUMN) {
            return null;
        }

        UIContainer uiRoot = findFirstComponentOfType(UIContainer.class);
        List<UIContainer> columns = getColumns();
        int colSize = columns.size();

        if (num < colSize) {
            for (int i = num; i < colSize; i++) {
                UIContainer tempCol = columns.get(i);
                List<UIComponent> components = new ArrayList<UIComponent>();
                for (UIComponent component : tempCol.getChildren()) {
                    columns.get(num - 1).addChild(component);
                    components.add(component);
                }
                uiRoot.removeChildById(tempCol.getId());
                for (UIComponent component : components) {
                    component.setParent(columns.get(num - 1));
                }
            }
        } else {
            if (num > colSize) {
                do {
                    UIContainer uiContainer = createUIComponent(UIContainer.class, null, null);
                    PortalDataMapper.toUIContainer(uiContainer, createContainer(ROW_CONTAINER, "UIColumn-" + colSize));
                    uiRoot.addChild(uiContainer);
                    colSize++;
                } while (num > colSize);
            }
View Full Code Here

     * @see List
     * @see UIContainer
     */
    public List<UIContainer> getColumns() {
        List<UIContainer> list = new ArrayList<UIContainer>();
        UIContainer uiRoot = findFirstComponentOfType(UIContainer.class);
        uiRoot.findComponentOfType(list, UIContainer.class);
        if (list.size() > 0 && list.contains(uiRoot)) {
            list.remove(uiRoot);
        }
        return list;
    }
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.webui.container.UIContainer

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.