Skip to content

ArakSer/NebulaGridWrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NebulaGridWrapper

NebulaGridWrapper helps to represent list of objects used by Nebula Grid.

You have to write how to represent the object in the table row:

    public static class SimpleNodeFactory extends NodeFactory {

        @Override
        public void setNodeData(Node node, final Object object) {
            Map values = new HashMap();
            values.put("name", new CellProperty(((PeopleDTO) object).getName()));
            values.put("age", new CellProperty(((PeopleDTO) object).getAge()));
            node.setCellPropertiesMap(values);
        }
    }

and create Grid:

        List columnsList = ColumnsFactory.createColumns(new String[] {"name", "age"});
        GridTable grid = new GridTable(shell, GridTable.DEFAULT_STYLE, new SimpleNodeFactory(), columnsList);

After that you can simply add data to the grid:

        grid.setData(DataProvider.getPeople());

Supported features:

  1. Color and font of columns and cells
  2. Tooltips
  3. Click and selection listeners
  4. Single- and multiselect rows
  5. Editors in cells
  6. Images in cells

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages