Search…
GridContainer

Overview

Is a class that uses grid layout, where each cell is a container. To use as cell you need to create a class that extends from GridContainer.Cell.
This component only works until version 4.3.8.

Source Code

1
add(gc = new GridContainer(GridContainer.HORIZONTAL_ORIENTATION),LEFT,TOP,FILL,FILL);
2
gc.setBackColor(Color.WHITE);
3
Flick f = gc.getFlick();
4
f.shortestFlick = 1000;
5
f.longestFlick = 6000;
6
gc.setPageSize(linhas,colunas);
7
gc.setRowsPerPage(linhasPorPagina);
8
Celula []cels = new Celula[TOTAL_ITEMS];
9
for (int i = 0; i < cels.length; i++)
10
cels[i] = new Celula(i);
11
gc.setCells(cels);
Copied!

Construtor

1
GridContainer(int orientation){}
Copied!
Constructs a GridContainer with the given orientation

Methods

Modifier and Type
Method
Description
Flick
getFlick()
Returns the flick attached to the ScrollContainer.
void
initUI()
Called to initialize the User Interface of this container.
void
onColorsChanged(boolean colorsChanged)
Called after a setEnabled, setForeColor and setBackColor and when a control has been added to a Container.
void
onEvent(Event e)
Called to process key, pen, control and other posted events.
void
onFontChanged()
Called after a setFont
void
setCells(GridContainer.Cell[] cells)
Sets the cells of this GridContainer.
void
setPageSize(int cols, int rows)
Sets the page size in columns and rows.
void
setRowsPerPage(int rpp)
Sets the rows per page.

References

Last modified 2yr ago