Package com.smartgwt.client.widgets.layout

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


        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;
            }
        });
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);
View Full Code Here

        sectionStack.setCanResizeSections(false);
        sectionStack.setWidth(300);
        sectionStack.setHeight(350);


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

        SectionStackSection section2 = new SectionStackSection("HTML Flow");
        section2.setExpanded(true);
        section2.setCanCollapse(true);
        section2.addItem(htmlFlow);
        sectionStack.addSection(section2);

        SectionStackSection section3 = new SectionStackSection("Green Pawn");
        section3.setExpanded(true);
        section3.setCanCollapse(false);
        section3.addItem(new Img("pieces/48/pawn_green.png", 48, 48));
        sectionStack.addSection(section3);

        SectionStackSection section4 = new SectionStackSection("Yellow Piece");
        section4.setExpanded(false);
        section4.addItem(new Img("pieces/48/piece_yellow.png", 48, 48));
        sectionStack.addSection(section4);

        return sectionStack;
    }
View Full Code Here

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

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

        SectionStackSection section2 = new SectionStackSection("HTML Flow");
        section2.setExpanded(true);
        section2.setCanCollapse(true);
        section2.addItem(htmlFlow);
        sectionStack.addSection(section2);

        SectionStackSection section3 = new SectionStackSection("Green Pawn");
        section3.setExpanded(true);
        section3.setCanCollapse(false);
        section3.addItem(new Img("pieces/48/pawn_green.png", 48, 48));
        sectionStack.addSection(section3);

        SectionStackSection section4 = new SectionStackSection("Yellow Piece");
        section4.setExpanded(false);
        section4.addItem(new Img("pieces/48/piece_yellow.png", 48, 48));
        sectionStack.addSection(section4);

        IButton expandButton = new IButton("Expand Blue");
        expandButton.setWidth(150);
        expandButton.addClickHandler(new ClickHandler() {
View Full Code Here

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

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

        SectionStackSection section2 = new SectionStackSection("HTML Flow");
        section2.setExpanded(true);
        section2.setCanCollapse(true);
        section2.addItem(htmlFlow);
        sectionStack.addSection(section2);

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

        final SectionStackSection section4 = new SectionStackSection("Yellow Piece");
        section4.setExpanded(false);
        section4.setHidden(true);
        section4.addItem(new Img("pieces/48/piece_yellow.png", 48, 48));
        sectionStack.addSection(section4);

        IButton showButton = new IButton("Show Section");
        showButton.setWidth(150);
        showButton.addClickHandler(new ClickHandler() {
View Full Code Here

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

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

        SectionStackSection section2 = new SectionStackSection("Help 1");
        section2.setExpanded(true);
        section2.setCanCollapse(true);

        section2.addItem(help1);
        sectionStack.addSection(section2);
        SectionStackSection section3 = new SectionStackSection("Help 2");
        section3.setExpanded(true);
        section3.setCanCollapse(true);
        section3.addItem(help2);
        sectionStack.addSection(section3);

        IButton resizeButton = new IButton("Resize Help 1");
        resizeButton.setWidth(150);
        resizeButton.addClickHandler(new ClickHandler() {
View Full Code Here

import com.smartgwt.client.widgets.tree.TreeGridField;

public class AddressbookTree extends SectionStack {
  public AddressbookTree() {
    super();
    SectionStackSection section = new SectionStackSection();
    section.setCanCollapse(false);
    section.setExpanded(true);
    section.setResizeable(true);

    TreeGrid tree = new TreeGrid();
    tree.setWidth100();
    tree.setHeight100();
    tree.setAnimateFolderTime(100);
    tree.setAnimateFolders(true);
    tree.setAnimateFolderSpeed(1000);
    tree.setShowSortArrow(SortArrow.CORNER);
    tree.setShowAllRecords(true);
    tree.setLoadDataOnDemand(false);
    tree.setCanSort(false);
    tree.setCellHeight(17);
    tree.setShowHeader(false);

    TreeGridField field = new TreeGridField();
    field.setCanFilter(true);
    field.setName("name");
    field.setTitle("<b>SmartGWT Showcase</b>");
    tree.setFields(field);

    Tree treeData = new Tree();
    treeData.setModelType(TreeModelType.PARENT);
    treeData.setNameProperty("name");
    treeData.setOpenProperty("isOpen");
    treeData.setIdField("nodeID");
    treeData.setParentIdField("parentNodeID");
    treeData.setRootValue("root");
    treeData.setData(DemoData.getAddressBookTreeData());

    tree.setData(treeData);
    section.setItems(tree);

    setSections(section);
  }
View Full Code Here

public class MessageListCanvas extends SectionStack {

  public MessageListCanvas() {
    super();

    SectionStackSection section = new SectionStackSection("Inbox");
    section.setCanCollapse(false);
    section.setExpanded(true);
    section.setResizeable(true);

    TextItem textItem = new TextItem();
    textItem.setTitle("Search");
    DynamicForm searchCanvas = new DynamicForm();
    searchCanvas.setItems(textItem);

    Button searchButton = new Button("");
    searchButton.setBorder("0px");
    searchButton.setIcon(ImageProvider.FIND);
    searchButton.setAutoFit(true);
    section.setControls(searchCanvas, searchButton);
   

    ListGrid grid = new ListGrid();
    grid.setAlternateRecordStyles(true);
    grid.setWidth100();
    grid.setCellHeight(17);
    grid.setBaseStyle("myOtherGridCell");
   
    ListGridField readField = new ListGridField("read", "");
    readField.setAlign(Alignment.CENTER);
    readField.setType(ListGridFieldType.IMAGE);
    readField.setCanSort(false);
    readField.setCanFreeze(false);
    readField.setWidth(25);
    Button headerButton = new Button();
    headerButton.setIcon(ImageProvider.MSG_STATUS_READ);
    readField.setHeaderButtonProperties(headerButton);

    ListGridField priorityField = new ListGridField("priority", "Priority");
    priorityField.setWidth(25);
    priorityField.setAlign(Alignment.CENTER);
    priorityField.setType(ListGridFieldType.IMAGE);

    ListGridField attachmentField = new ListGridField("attachment",
        "Attachment");
    attachmentField.setAlign(Alignment.CENTER);
    attachmentField.setType(ListGridFieldType.IMAGE);
    attachmentField.setWidth(25);

    ListGridField fromField = new ListGridField("from", "From");
    fromField.setWidth(200);
    ListGridField subjectField = new ListGridField("subject", "Subject");
    subjectField.setWidth(250);
    ListGridField receivedField = new ListGridField("receiveDate",
        "Receive");
    receivedField.setWidth(150);
    ListGridField sizeField = new ListGridField("size", "Size");
    sizeField.setWidth(80);

    grid.setFields(readField, priorityField, attachmentField, fromField,
        subjectField, receivedField, sizeField);
    grid.setData(MailData.getRecords());

    section.setItems(grid);
    setSections(section);
  }
View Full Code Here

public class MailfolderTree extends SectionStack {

  public MailfolderTree() {
    super();
    SectionStackSection section = new SectionStackSection();
    section.setCanCollapse(false);
    section.setExpanded(true);
    section.setResizeable(true);

    TreeGrid tree = new TreeGrid();
    tree.setWidth100();
    tree.setHeight100();
    tree.setAnimateFolderTime(100);
    tree.setAnimateFolders(true);
    tree.setAnimateFolderSpeed(1000);
    tree.setShowSortArrow(SortArrow.CORNER);
    tree.setShowAllRecords(true);
    tree.setLoadDataOnDemand(false);
    tree.setCanSort(false);
    tree.setCellHeight(17);
    tree.setShowHeader(false);

    TreeGridField field = new TreeGridField();
    field.setCanFilter(true);
    field.setName("name");
    field.setTitle("<b>SmartGWT Showcase</b>");
    tree.setFields(field);

    Tree treeData = new Tree();
    treeData.setModelType(TreeModelType.PARENT);
    treeData.setNameProperty("name");
    treeData.setOpenProperty("isOpen");
    treeData.setIdField("nodeID");
    treeData.setParentIdField("parentNodeID");
    treeData.setRootValue("root");
    treeData.setData(DemoData.getMailTreeData());

    tree.setData(treeData);
    section.setControls(createToolbar());
    section.setItems(tree);

    setSections(section);
  }
View Full Code Here

    super();

    this.sectionStack = new SectionStack();

    this.section = new SectionStackSection();
    this.section.setCanCollapse( false );
    this.section.setExpanded( true );
    this.section.setResizeable( true );
    this.section.setShowHeader( true );
View Full Code Here

TOP

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

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.