Package com.smartgwt.client.widgets.tree

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


        treeGrid.setShowOpenIcons(false);
        treeGrid.setShowDropIcons(false);
        treeGrid.setClosedIconSuffix("");
        treeGrid.setAutoFetchData(true);

        TreeGridField nameField = new TreeGridField("Name");
        TreeGridField jobField = new TreeGridField("Job");
        TreeGridField salaryField = new TreeGridField("Salary");
        salaryField.setCellFormatter(new CellFormatter() {
            public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
                if (value != null) {
                    NumberFormat nf = NumberFormat.getFormat("#,##0");
                    try {
                        return "$" + nf.format(((Number) value).longValue());
View Full Code Here


        setShowSortArrow(SortArrow.CORNER);
        setShowAllRecords(true);
        setLoadDataOnDemand(false);
        setCanSort(false);
       
        TreeGridField field = new TreeGridField();
        field.setCanFilter(true);
        field.setName("nodeTitle");
        field.setTitle("<b>Samples</b>");
        setFields(field);

        Tree tree = new Tree();
        tree.setModelType(TreeModelType.PARENT);
        tree.setNameProperty("nodeTitle");
View Full Code Here

      return DESCRIPTION;
    }
  }

  public Canvas getViewPanel() {
    TreeGridField fieldName = new TreeGridField("Name", 150);
    TreeGridField fieldJob = new TreeGridField("Job", 150);
    TreeGridField fieldSalary = new TreeGridField("Salary");

    TreeGrid employeeTree = new TreeGrid();
    employeeTree.setWidth(500);
    employeeTree.setHeight(250);
    employeeTree.setDataSource(EmployeeXmlDS.getInstance());
    employeeTree.setNodeIcon("icons/16/person.png");
    employeeTree.setFolderIcon("icons/16/person.png");
    employeeTree.setAutoFetchData(true);
    employeeTree.setLoadDataOnDemand(false);
    employeeTree.setCanEdit(true);
    employeeTree.setCanReorderRecords(true);
    employeeTree.setCanAcceptDroppedRecords(true);
    employeeTree.setShowDropIcons(false);
    employeeTree.setShowOpenIcons(false);
    employeeTree.setClosedIconSuffix("");
    employeeTree.setFields(fieldName, fieldJob, fieldSalary);
   
    final ListGrid employeeGrid = new ListGrid();
    employeeGrid.setWidth(500);
    employeeGrid.setHeight(250);
        employeeGrid.setEmptyMessage("Select an Employee from the PickTree Item above.");
    employeeGrid.setDataSource(EmployeeXmlDS.getInstance());
    employeeGrid.setCanEdit(true);
    employeeGrid.setFields(new TreeGridField("Name", 150), new TreeGridField("Job", 150), new TreeGridField("Salary"));

    IPickTreeItem searchPickTree = new IPickTreeItem();
    searchPickTree.setCanSelectParentItems(true);
    searchPickTree.setShowTitle(false);
    searchPickTree.setDataSource(EmployeeXmlDS.getInstance());
View Full Code Here

    public Canvas getViewPanel() {
        TreeGrid treeGrid = new TreeGrid();
        treeGrid.setWidth(300);
        treeGrid.setHeight(400);

        TreeGridField field = new TreeGridField("Name", "Tree from local data");
        field.setCanSort(false);

        treeGrid.setFields(field);

        Tree tree = new Tree();
        tree.setModelType(TreeModelType.PARENT);
View Full Code Here

        employeeTree.setIdField("EmployeeId");
        employeeTree.setParentIdField("ReportsTo");
        employeeTree.setOpenProperty("isOpen");
        employeeTree.setData(employeeData);
       
        TreeGridField formattedField = new TreeGridField("Name");
        formattedField.setCellFormatter(new CellFormatter() {
            public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
                return record.getAttributeAsString("Job") + ":&nbsp;" + value;
            }
        });
       
View Full Code Here

    public Canvas getViewPanel() {
        TreeGrid treeGrid = new TreeGrid();
        treeGrid.setWidth(300);
        treeGrid.setHeight(400);

        TreeGridField field = new TreeGridField();
        field.setName("Name");
        field.setTitle("Tree from local data");
        field.setCanSort(false);

        treeGrid.setFields(field);

        Tree tree = new Tree();
        tree.setModelType(TreeModelType.PARENT);
View Full Code Here

        treeGrid.setNodeIcon("icons/16/person.png");
        treeGrid.setFolderIcon("icons/16/person.png");
        treeGrid.setAutoFetchData(true);


        TreeGridField nameField = new TreeGridField("Name", 150);
        TreeGridField jobField = new TreeGridField("Job", 150);
        TreeGridField salaryField = new TreeGridField("Salary");

        treeGrid.setFields(nameField, jobField, salaryField);
       
        treeGrid.addDataArrivedHandler(new DataArrivedHandler() {
            public void onDataArrived(DataArrivedEvent event) {
View Full Code Here

        treeGrid.setFolderIcon("icons/16/person.png");
        treeGrid.setAutoFetchData(true);
        treeGrid.setCanFreezeFields(true);
        treeGrid.setCanReparentNodes(true);       

        TreeGridField nameField = new TreeGridField("Name", 150);
        nameField.setFrozen(true);

        TreeGridField jobField = new TreeGridField("Job", 150);
        TreeGridField employeeTypeField = new TreeGridField("EmployeeType", 150);
        TreeGridField employeeStatusField = new TreeGridField("EmployeeStatus", 150);
        TreeGridField salaryField = new TreeGridField("Salary");
        TreeGridField genderField = new TreeGridField("Gender");
        TreeGridField maritalStatusField = new TreeGridField("MaritalStatus");

        treeGrid.setFields(nameField, jobField, employeeTypeField,employeeStatusField,
                salaryField, genderField, maritalStatusField);

        return treeGrid;
View Full Code Here

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

        treeGridAux.setWidth("100%");
        treeGridAux.setHeight("100%");

        //create the fields of the TreeGrid.
        final int widthField = 300;
        TreeGridField field = new TreeGridField("Name", title, widthField);
        field.setCanSort(false);
        field.setShowAlternateStyle(true);
        treeGridAux.setFields(field);

        //configure the handlers of the TreeGrid
        treeGridAux.addDrawHandler(new DrawHandler() {
            public void onDraw(DrawEvent event) {
View Full Code Here

TOP

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

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.