Package com.smartgwt.client.widgets

Examples of com.smartgwt.client.widgets.Canvas


        final LayoutSpacer placeHolder = new LayoutSpacer();
        //        placeHolder.setRect(newPortlet.getRect());
        portalColumn.addMember(placeHolder); // add to top

        // create an outline around the clicked button
        final Canvas outline = new Canvas();
        outline.setLeft(editForm.getAbsoluteLeft() + addPortlet.getLeft());
        outline.setTop(editForm.getAbsoluteTop());
        outline.setWidth(addPortlet.getWidth());
        outline.setHeight(addPortlet.getHeight());
        outline.setBorder("2px solid 8289A6");
        outline.draw();
        outline.bringToFront();

        outline.animateRect(newPortletWindow.getPageLeft(), newPortletWindow.getPageTop(),
            newPortletWindow.getVisibleWidth(), newPortletWindow.getViewportHeight(), new AnimationCallback() {
                public void execute(boolean earlyFinish) {
                    // callback at end of animation - destroy placeholder and outline; show the new portlet
                    placeHolder.destroy();
                    outline.destroy();
                    newPortletWindow.show();
                }
            }, 750);
        save();
    }
View Full Code Here


        maximizedPortlet = portletWindow;

        int numColumns = storedDashboard.getColumns();
        for (int i = 0; i < numColumns; ++i) {
            PortalColumn col = portalLayout.getPortalColumn(i);
            Canvas portlet = col.getMember(portletWindow.getID());
            if (null == portlet) {
                col.hide();
            } else {
                for (Canvas member : col.getMembers()) {
                    if (!member.equals(portlet)) {
View Full Code Here

            if (def != null) {

                this.startingConfig = wizard.getNewResourceStartingConfiguration();

                if (!newCanvas) {
                    Canvas doomedConfigEditor = this.vLayout.getMember(0);
                    this.vLayout.removeMember(doomedConfigEditor);
                    doomedConfigEditor.destroy();
                }

                this.startingConfig = wizard.getNewResourceStartingConfiguration();

                ConfigurationGWTServiceAsync configurationService = GWTServiceLookup.getConfigurationService();
View Full Code Here

                        onFailure(new Exception(MSG.view_adminTopology_storageNodes_detail_errorNoResourcesWithAlerts()));
                    } else {
                        removeMember(sectionStack);
                        sectionStack.destroy();
                        int[] resIds = ArrayUtils.unwrapArray(result);
                        Canvas alertsView = new StorageNodeAlertHistoryView("storageNode_" + storageNodeId + "_Alerts",
                            resIds, header, storageNodeId);
                        addMember(alertsView);
                    }
                }
            });
View Full Code Here

        listLayout.setHeight100();

        ListGrid listGrid = new ListGrid() {
            @Override
            protected Canvas getExpansionComponent(ListGridRecord record) {
                Canvas canvas = super.getExpansionComponent(record);
                canvas.setPadding(5);
                return canvas;
            }
        };
        listGrid.setWidth100();
        listGrid.setHeight100();
        listGrid.setCanExpandRecords(true);
        listGrid.setExpansionMode(ExpansionMode.DETAIL_FIELD);
        listGrid.setDetailField("result");
        ListGridField step = new ListGridField("description", MSG.view_remoteAgentInstall_step());
        ListGridField result = new ListGridField("result", MSG.view_remoteAgentInstall_result());
        ListGridField resultCode = new ListGridField("resultCode", MSG.view_remoteAgentInstall_resultCode(), 90);
        ListGridField duration = new ListGridField("duration", MSG.common_title_duration(), 90);
        listGrid.setFields(step, result, resultCode, duration);
        listGrid.setData(getStepRecords(info));
        listGrid.setAutoFitData(Autofit.BOTH);
        listGrid.setLeaveScrollbarGap(false);
        listGrid.setShowAllRecords(true);
        listGrid.setBodyOverflow(Overflow.CLIP_H);
        listGrid.setOverflow(Overflow.SCROLL);
        listLayout.setLeaveScrollbarGap(true);
        listLayout.addMember(listGrid);
        listCanvas.setCanvas(listLayout);
        listCanvas.setOverflow(Overflow.AUTO);
        listLayout.setOverflow(Overflow.AUTO);

        // Replace the current info with just the install steps
        for (Canvas canvas : this.getChildren()) {
            canvas.markForDestroy();
        }

        createAgentStatusTextItem();
        infoForm.setFields(infoHeader, version, path, owner, config, agentStatusText, listCanvas);
View Full Code Here

        super.onInit();

        // each portletWindow wraps a single portlet view
        view = PortletFactory.buildPortlet(this, storedPortlet, context);

        Canvas canvas = (Canvas) view;
        addItem(canvas);

        settingsHandlerDelegate = new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                new PortletSettingsWindow(PortletWindow.this, storedPortlet, view).show();
View Full Code Here

        setCanAcceptDrop(true);

        // change appearance of drag placeholder and drop indicator
        setDropLineThickness(4);

        Canvas dropLineProperties = new Canvas();
        dropLineProperties.setBackgroundColor("#4A5D75");
        setDropLineProperties(dropLineProperties);

        setShowDragPlaceHolder(true);

        Canvas placeHolderProperties = new Canvas();
        placeHolderProperties.setBorder("2px solid #4A5D75");
        setPlaceHolderProperties(placeHolderProperties);

        // Allow column resizing (width only)
        setCanDragResize(true);
View Full Code Here

     * Switches to viewing the details canvas, hiding the table. This does not
     * do anything with reloading data or switching to the selected row in the table;
     * this only changes the visibility of canvases.
     */
    protected void switchToDetailsView() {
        Canvas contents = getCarouselContents();

        // If the Carousel has not yet been initialized then ignore
        if (contents != null) {
            // If the carousel view is visible then gracefully switch to the details view.
            if (contents.isVisible()) {
                contents.animateHide(AnimationEffect.WIPE, new AnimationCallback() {
                    @Override
                    public void execute(boolean b) {
                        buildDetailsView();
                    }
                });
            } else {
                // Even if the table view is not visible, it may not be hidden. Instead, it may be the
                // case that its parent (the encompassing Table/HLayout) may not be visible.  This is unusual
                // because typically we switch between the table and detail view while under the subtab, but
                // if we navigate to the detail view from another subtab (for example, the drift tree context
                // menu) the Table may not be visible and the table view may not be hidden.  To make a long
                // story short, ensure the table view is hidden when displaying the details view.
                contents.hide();

                /*
                 * if the programmer chooses to go directly from the detailView in create-mode to the
                 * detailsView in edit-mode, the content canvas will already be hidden, which means the
                 * animateHide would be a no-op (the event won't fire).  this causes the detailsHolder
View Full Code Here

    /**
     * Switches to viewing the table, hiding the details canvas.
     */
    protected void switchToCarouselView() {
        final Canvas contents = getCarouselContents();
        if (contents != null) {
            // If this is not the initial display of the table, refresh the table's data. Otherwise, a refresh would be
            // redundant, since the data was just loaded when the table was drawn.
            if (this.initialDisplay) {
                this.initialDisplay = false;
            } else {
                Log.debug("Refreshing data for Table [" + getClass().getName() + "]...");
                refresh();
            }
            // if the detailsHolder is visible then gracefully switch views, otherwise just
            // clean up any lingering details holder and show the table view.
            if (detailsHolder != null && detailsHolder.isVisible()) {
                detailsHolder.animateHide(AnimationEffect.WIPE, new AnimationCallback() {
                    @Override
                    public void execute(boolean b) {
                        EnhancedUtility.destroyMembers(detailsHolder);

                        contents.animateShow(AnimationEffect.WIPE);
                    }
                });
            } else {
                if (detailsHolder != null) {
                    EnhancedUtility.destroyMembers(detailsHolder);
                }
                contents.animateShow(AnimationEffect.WIPE);
            }
        }
    }
View Full Code Here

        setHeight100();

        treeView = new ResourceTreeView();
        addMember(treeView);

        contentCanvas = new Canvas();
        addMember(contentCanvas);

        setToDetailView();
    }
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.Canvas

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.