Package org.exoplatform.portal.webui.application

Examples of org.exoplatform.portal.webui.application.UIGadget


     * @return <code>UIGadget</code> which deleted<br>
     *         <code>null</code> otherwise
     * @see UIGadget
     */
    public UIGadget removeUIGadget(final int col, final int row) {
        UIGadget gadget = getUIGadget(col, row);
        if (gadget != null) {
            removeUIGadget(gadget.getId());
        }
        return gadget;
    }
View Full Code Here


     * @param col index of destination column
     * @param row index of destination row
     * @see UIGadget
     */
    public void moveUIGadget(final String gadgetId, final int col, final int row) {
        UIGadget gadget = removeUIGadget(gadgetId);
        if (gadget == null) {
            return;
        }
        addUIGadget(gadget, col, row);
    }
View Full Code Here

     *
     * @return <code>false</code> if and only if this UIDashboardContainer has no UIGadget<br>
     *         <code>true</code> otherwise
     */
    public boolean hasUIGadget() {
        UIGadget gadget = findFirstComponentOfType(UIGadget.class);
        return (gadget != null);
    }
View Full Code Here

                UIApplication uiApplication = context.getUIApplication();
                uiApplication.addMessage(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null));
                context.setAttribute(UIDashboard.APP_NOT_EXIST, true);
                return;
            }
            UIGadget uiGadget = event.getSource().createUIComponent(context, UIGadget.class, null, null);
            uiGadget.setState(new TransientApplicationState<Gadget>(application.getApplicationName()));
            UIDashboardContainer uiDashboardContainer = uiDashboard.getChild(UIDashboardContainer.class);
            uiDashboardContainer.addUIGadget(uiGadget, col, row);
            uiDashboardContainer.save();
            context.addUIComponentToUpdateByAjax(uiDashboardContainer);
        }
View Full Code Here

     */
    public UIGadget getUIGadget(final String gadgetId) {
        List<UIContainer> columns = getColumns();
        for (int iCol = 0; iCol < getColumns().size(); iCol++) {
            for (int iRow = 0; iRow < columns.get(iCol).getChildren().size(); iRow++) {
                UIGadget gadget = (UIGadget) columns.get(iCol).getChild(iRow);
                if (gadgetId.equals(gadget.getId())) {
                    return gadget;
                }
            }
        }
        return null;
View Full Code Here

     * @return <code>UIGadget</code> which deleted<br>
     *         <code>null</code> otherwise
     * @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

     * @return <code>UIGadget</code> which deleted<br>
     *         <code>null</code> otherwise
     * @see UIGadget
     */
    public UIGadget removeUIGadget(final int col, final int row) {
        UIGadget gadget = getUIGadget(col, row);
        if (gadget != null) {
            removeUIGadget(gadget.getId());
        }
        return gadget;
    }
View Full Code Here

     * @param col index of destination column
     * @param row index of destination row
     * @see UIGadget
     */
    public void moveUIGadget(final String gadgetId, final int col, final int row) {
        UIGadget gadget = removeUIGadget(gadgetId);
        if (gadget == null) {
            return;
        }
        addUIGadget(gadget, col, row);
    }
View Full Code Here

     *
     * @return <code>false</code> if and only if this UIDashboardContainer has no UIGadget<br>
     *         <code>true</code> otherwise
     */
    public boolean hasUIGadget() {
        UIGadget gadget = findFirstComponentOfType(UIGadget.class);
        return (gadget != null);
    }
View Full Code Here

                UIApplication uiApplication = context.getUIApplication();
                uiApplication.addMessage(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null));
                context.setAttribute(UIDashboard.APP_NOT_EXIST, true);
                return;
            }
            UIGadget uiGadget = event.getSource().createUIComponent(context, UIGadget.class, null, null);
            uiGadget.setState(new TransientApplicationState<Gadget>(application.getApplicationName()));
            UIDashboardContainer uiDashboardContainer = uiDashboard.getChild(UIDashboardContainer.class);
            uiDashboardContainer.addUIGadget(uiGadget, col, row);
            uiDashboardContainer.save();
            context.addUIComponentToUpdateByAjax(uiDashboardContainer);
        }
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.webui.application.UIGadget

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.