1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| public class Tableau {
/*~*~*~*~*~*~*~*~*~*~*
*ATTRIBUTS
*~*~*~*~*~*~*~*~*~*~*/
//a table object
private Table itself;
//the parent composite which the Table object depends on
private Composite parent;
//the layout for the Table
private TableColumnLayout tableColumnLayout;
//the name of columns
private String[] columns;
//the content of each row
private String[][] content;
/*~*~*~*~*~*~*~*~*~*~*
* CONSTRUCTORS
*~*~*~*~*~*~*~*~*~*~*/
public Tableau(Composite parent, String[] column, String[][] content) {
super();
setItself(new Table(parent, SWT.MULTI | SWT.FULL_SELECTION));
itself.setHeaderVisible(true);
itself.setLinesVisible(true);
tableColumnLayout = new TableColumnLayout();
itself.setLayout(tableColumnLayout);
this.parent = parent;
this.columns = column;
this.content = content;
createColumn();
createRow();
} |
Partager