Package com.smartgwt.client.widgets.tree

Examples of com.smartgwt.client.widgets.tree.Tree


    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


    /**
     * Create a new tree.
     * @return Tree: new tree.
     */
    private Tree createTree() {
        final Tree treeAux = new Tree();
        treeAux.setModelType(TreeModelType.PARENT);
        treeAux.setNameProperty("Name");
        treeAux.setIdField("EmployeeId");
        treeAux.setParentIdField("ReportsTo");
        treeAux.setShowRoot(true);

        return treeAux;
    }
View Full Code Here

    /**
     * restart the treegrid about free people
     */
    private void restartTreeGridFree() {
        treeGrid.clear();
        Tree treeAux = createTree();
        treeAux.setData(nodesTreeFree);
        TreeGrid treeGrid2 = createTreeGrid(treeAux, constants.peopleFree());
        treeGrid = treeGrid2;
        treeGrid.getData().openAll();

        treeGrid.setGenerateClickOnEnter(false);
View Full Code Here

    /**
     * restart the treegrid of the busy people
     */
    private void restartTreeGridWork() {
        treeGridWork.clear();
        Tree treeAux = createTree();
        treeAux.setData(nodesTreeWork);
        TreeGrid treeGrid2 = createTreeGrid(treeAux, constants.peopleAssigned());
        treeGridWork = treeGrid2;
        treeGridWork.getData().openAll();

        treeGridWork.setGenerateClickOnEnter(false);
View Full Code Here

    rootNode.setAttribute(Name1, "Root1");
    rootNode.setAttribute(Type, Sequence);
    rootNode.setAttribute(Min, 1);
    rootNode.setAttribute(Max, 1);

    Tree tree = new Tree();
    tree.setModelType(TreeModelType.PARENT);
    tree.setRootValue(1);
    tree.setNameProperty("Name1");
    tree.setOpenProperty("isOpen");
    tree.setData(new TreeNode[] { rootNode });

    treeGrid = new TreeGrid();
    treeGrid.setData(tree);
    treeGrid.setCanReorderRecords(true);
    treeGrid.setCanAcceptDroppedRecords(true);
View Full Code Here

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

  /**
   * @return
   */
  private TreeNode getInboxTreeNode() {

    Tree treeData = this.tree.getData();
    TreeNode[] nodes = treeData.getChildren( treeData.getRoot() );
    if ( nodes != null && nodes.length > 0 ) {
      if ( GWTUtil.getGwtFolder( nodes[0] ) instanceof GWTMailbox ) {
        nodes = treeData.getChildren( nodes[0] );
      }

      for (TreeNode node : nodes) {
        GWTMailFolder folder = (GWTMailFolder) GWTUtil.getGwtFolder( node );
        if ( folder.isInbox() ) {
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.tree.Tree

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.