This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Shell 3.3.1! |
GridView
GridView is a special type of view and its purpose is to layout other views using a grid layout algorithms. Inherits BoxView.
GridView grid = new GridView();
grid.setShowBorders(true);
grid.setRowSize(0, 0);
grid.setColumnSize(0, 0);
grid.addItem(new BoxView(), 0, 0, 1, 1, 0, 0);
grid.addItem(new BoxView(), 0, 1, 1, 1, 0, 0);
grid.addItem(new BoxView(), 1, 0, 1, 1, 0, 0);
grid.addItem(new BoxView(), 1, 1, 1, 1, 0, 0);
Will result layout of:
┌───┬───┐
│ │ │
│ │ │
├───┼───┤
│ │ │
│ │ │
└───┴───┘