Package com.smartgwt.client.widgets.layout

Examples of com.smartgwt.client.widgets.layout.SectionStack


    @Override
    protected void onDraw() {
        super.onDraw();

        final SectionStack sectionStack;

        sectionStack = new SectionStack();
        sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        sectionStack.setWidth100();
        sectionStack.setHeight100();
        sectionStack.setOverflow(Overflow.AUTO);

        pluginManager.getAgentPlugin(this.pluginId, new AsyncCallback<Plugin>() {
            public void onSuccess(Plugin plugin) {
                prepareDetailsSection(sectionStack, plugin);
                prepareHelpSection(sectionStack, plugin);
View Full Code Here


            TitleBar titleBar = getTitleBar();
            titleBar.setExtraSpace(10);
            layout.addMember(titleBar);

            SectionStack sectionStack = new SectionStack();
            sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);

            ListGrid platformsList = getCustomResourceTypeListGrid();
            SectionStackSection platforms = new SectionStackSection(MSG.view_adminTemplates_platforms());
            platforms.setExpanded(true);
            platforms.addItem(platformsList);

            ListGrid platformServicesList = getCustomResourceTypeListGrid();
            SectionStackSection platformServices = new SectionStackSection(MSG.view_adminTemplates_platformServices());
            platformServices.setExpanded(true);
            platformServices.addItem(platformServicesList);

            TreeGrid serversTreeGrid = new CustomResourceTypeTreeGrid();
            SectionStackSection servers = new SectionStackSection(MSG.view_adminTemplates_servers());
            servers.setExpanded(true);
            servers.addItem(serversTreeGrid);

            sectionStack.addSection(platforms);
            sectionStack.addSection(platformServices);
            sectionStack.addSection(servers);

            layout.addMember(sectionStack);
            this.gridCanvas = layout;

            // this will asynchronously populate the grids with the appropriate data
View Full Code Here

        this.serverId = serverId;
        setHeight100();
        setWidth100();
        setOverflow(Overflow.AUTO);

        sectionStack = new SectionStack();
        sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        sectionStack.setWidth100();
        sectionStack.setHeight100();
        sectionStack.setMargin(5);
        sectionStack.setOverflow(Overflow.VISIBLE);
View Full Code Here

        this.pluginId = pluginId;
        setHeight100();
        setWidth100();
        setOverflow(Overflow.AUTO);

        sectionStack = new SectionStack();
        sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        sectionStack.setWidth100();
        sectionStack.setHeight100();
        sectionStack.setMargin(5);
        sectionStack.setOverflow(Overflow.VISIBLE);
View Full Code Here

        treeGrid.setFields(field);

        HLayout navLayout = new HLayout();
        navLayout.setMembers(treeGrid, listGrid);

        SectionStack sectionStack = new SectionStack();       
        sectionStack.setWidth(600);
        sectionStack.setHeight(400);
        sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        sectionStack.setAnimateSections(true);
        sectionStack.setOverflow(Overflow.HIDDEN);

        SectionStackSection summarySection = new SectionStackSection();
        summarySection.setTitle("Summary");
        summarySection.setExpanded(true);
        summarySection.setItems(navLayout);

        SectionStackSection detailsSection = new SectionStackSection();
        detailsSection.setTitle("Details");
        detailsSection.setExpanded(true);
        detailsSection.setItems(tabSet);

        sectionStack.setSections(summarySection, detailsSection);


        return sectionStack;
    }
View Full Code Here

        }
    }

    public Canvas getViewPanel() {

        SectionStack sectionStack = new SectionStack();
        sectionStack.setWidth(550);
        sectionStack.setHeight(230);

        String title = Canvas.imgHTML("silk/world.png") + " Countries Visited";
        SectionStackSection section = new SectionStackSection(title);

        section.setCanCollapse(false);
        section.setExpanded(true);

        final ListGrid countryGrid = new ListGrid();
        countryGrid.setWidth(550);
        countryGrid.setHeight(224);
        countryGrid.setShowAllRecords(true);
        countryGrid.setCellHeight(22);
        countryGrid.setDataSource(CountryXmlDS.getInstance());

        ListGridField countryCodeField = new ListGridField("countryCode", "Flag", 40);
        countryCodeField.setAlign(Alignment.CENTER);
        countryCodeField.setType(ListGridFieldType.IMAGE);
        countryCodeField.setImageURLPrefix("flags/16/");
        countryCodeField.setImageURLSuffix(".png");
        countryCodeField.setCanEdit(false);

        ListGridField nameField = new ListGridField("countryName", "Country");
        ListGridField continentField = new ListGridField("continent", "Continent");
        ListGridField memberG8Field = new ListGridField("member_g8", "Member G8");
        ListGridField populationField = new ListGridField("population", "Population");
        populationField.setType(ListGridFieldType.INTEGER);
        populationField.setCellFormatter(new CellFormatter() {
            public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
                if(value == null) return null;
                NumberFormat nf = NumberFormat.getFormat("0,000");
                try {
                    return nf.format(((Number) value).longValue());
                } catch (Exception e) {
                    return value.toString();
                }
            }
        });
        ListGridField independenceField = new ListGridField("independence", "Independence");
        countryGrid.setFields(countryCodeField, nameField,continentField, memberG8Field, populationField, independenceField);

        countryGrid.setAutoFetchData(true);
        countryGrid.setCanEdit(true);
        countryGrid.setEditEvent(ListGridEditEvent.CLICK);

        section.setItems(countryGrid);
        sectionStack.setSections(section);
        return sectionStack;
    }
View Full Code Here

                event.cancel();
            }
        });


        SectionStack leftSideLayout = new SectionStack();
        leftSideLayout.setWidth(280);
        leftSideLayout.setShowResizeBar(true);
        leftSideLayout.setVisibilityMode(VisibilityMode.MULTIPLE);
        leftSideLayout.setAnimateSections(true);

        SectionStackSection suppliesCategorySection = new SectionStackSection("Office Supply Categories");
        suppliesCategorySection.setExpanded(true);
        suppliesCategorySection.setItems(categoryTree);

        SectionStackSection instructionsSection = new SectionStackSection("Instructions");
        instructionsSection.setItems(new HelpPane());
        instructionsSection.setExpanded(true);

        leftSideLayout.setSections(suppliesCategorySection, instructionsSection);

        SectionStack rightSideLayout = new SectionStack();
        rightSideLayout.setVisibilityMode(VisibilityMode.MULTIPLE);
        rightSideLayout.setAnimateSections(true);


        searchForm.setHeight(60);
        searchForm.addFindListener(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {
            public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event) {
                findItems(null);
            }
        });

        SectionStackSection findSection = new SectionStackSection("Find Items");
        findSection.setItems(searchForm);
        findSection.setExpanded(true);

        SectionStackSection supplyItemsSection = new SectionStackSection("Office Supply Items");
        supplyItemsSection.setItems(itemList);
        supplyItemsSection.setExpanded(true);

        itemDetailTabPane = new ItemDetailTabPane(supplyItemDS, supplyCategoryDS, itemList);
        SectionStackSection itemDetailsSection = new SectionStackSection("Item Details");
        itemDetailsSection.setItems(itemDetailTabPane);
        itemDetailsSection.setExpanded(true);

        rightSideLayout.setSections(findSection, supplyItemsSection, itemDetailsSection);

        addMember(leftSideLayout);
        addMember(rightSideLayout);
    }
View Full Code Here

    public Canvas getViewPanel() {

        CountryXmlDS countryDS = CountryXmlDS.getInstance();

        SectionStack printStack = new SectionStack();
        printStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        printStack.setWidth(400);
        printStack.setHeight(455);


        final DetailViewer printViewer = new DetailViewer();
        printViewer.setDataSource(countryDS);
        printViewer.setWidth100();
        printViewer.setMargin(15);
        printViewer.setEmptyMessage("Select a country to view its details");

        final ListGrid printGrid = new ListGrid();
        printGrid.setHeight(150);

        printGrid.setDataSource(countryDS);

        ListGridField countryCode = new ListGridField("countryCode", "Code", 50);
        ListGridField countryName = new ListGridField("countryName", "Country");
        ListGridField capital = new ListGridField("capital", "Capital");
        ListGridField continent = new ListGridField("continent", "Continent");
        printGrid.setFields(countryCode, countryName, capital, continent);

        printGrid.addRecordClickHandler(new RecordClickHandler() {
            public void onRecordClick(RecordClickEvent event) {
                printViewer.setData(new Record[]{event.getRecord()});
            }
        });

        SectionStackSection countriesSection = new SectionStackSection("Countries");
        countriesSection.setExpanded(true);
        countriesSection.addItem(printGrid);
        printStack.addSection(countriesSection);

        SectionStackSection detailsSection = new SectionStackSection("Country Details");
        detailsSection.setExpanded(true);
        detailsSection.addItem(printViewer);
        printStack.addSection(detailsSection);


        final VLayout printContainer = new VLayout(10);

View Full Code Here

            return DESCRIPTION;
        }
    }

    public Canvas getViewPanel() {
        final SectionStack sectionStack = new SectionStack();
        sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        sectionStack.setWidth(300);
        sectionStack.setHeight(350);

        SectionStackSection section1 = new SectionStackSection("Blue Pawn");
        section1.setID("blueSection");
        section1.setExpanded(true);
        section1.addItem(new Img("pieces/48/pawn_blue.png", 48, 48));
        sectionStack.addSection(section1);

        SectionStackSection section2 = new SectionStackSection("Green Cube");
        section2.setExpanded(true);
        section2.setCanCollapse(false);
        section2.addItem(new Img("pieces/48/cube_green.png", 48, 48));
        sectionStack.addSection(section2);

        SectionStackSection section3 = new SectionStackSection("Blue Cube");
        section3.setExpanded(false);
        section3.addItem(new Img("pieces/48/cube_blue.png", 48, 48));
        sectionStack.addSection(section3);

        lastSectionIndex = 2;

        IButton addButton = new IButton("Add Section");
        addButton.setWidth(150);
        addButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {

                SectionStackSection section2 = sectionStack.getSection("blueSection");
                String title = lastSectionIndex % 2 == 0 ? "Yellow Piece" : "Blue Cube";
                String iconName = lastSectionIndex % 2 == 0 ? "piece_yellow" : "cube_blue";
                SectionStackSection section = new SectionStackSection(title);
                section.setExpanded(lastSectionIndex % 2 == 0);
                section.addItem(new Img("pieces/48/" + iconName + ".png", 48, 48));
                sectionStack.addSection(section);
                ++lastSectionIndex;
            }
        });

        IButton removeButton = new IButton("Remove Section");
        removeButton.setWidth(150);
        removeButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                sectionStack.removeSection(lastSectionIndex);
                --lastSectionIndex;
            }
        });

        HLayout layout = new HLayout();
View Full Code Here

        });

        form.setFields(selectItem);


        SectionStack sectionStack = new SectionStack();

        SectionStackSection section1 = new SectionStackSection();
        section1.setTitle("Monitors");
        section1.setItems(listGrid);
        section1.setControls(addButton, removeButton);
        section1.setExpanded(true);

        SectionStackSection section2 = new SectionStackSection();
        section2.setTitle("Status");
        section2.setItems(statusReport);
        section2.setControls(form);
        section2.setExpanded(true);

        sectionStack.setSections(section1, section2);
        sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        sectionStack.setAnimateSections(true);
        sectionStack.setWidth(300);
        sectionStack.setHeight(400);
        sectionStack.setOverflow(Overflow.HIDDEN);

        return sectionStack;
    }
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.layout.SectionStack

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.