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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
Composite top = new Composite(parent, SWT.NONE);
this.table = new Table(top, SWT.CHECK);
this.table.setSize(204,1000);
this.table.setHeaderVisible(true);
this.table.setLinesVisible(false);
...................
TableColumn colonne1 = new TableColumn(table, SWT.CENTER);
colonne1.setText("Vertex List");
colonne1.setWidth(204);
if (null != this.activeXmlFile){
final Object[] colStrEnable = this.activeXmlFile.getComponentsEnable().toArray();
final Object[] colStrName = this.activeXmlFile.getComponentsName().toArray();
for (int i=0; i< this.activeXmlFile.getComponentsLength() ;i++)
{
TableItem ligne = new TableItem(table,SWT.NONE);
ligne.setText((String)colStrName[i]);
ligne.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
TableColumn colonne1 = new TableColumn(table, SWT.CENTER);
colonne1.setText("Vertex List");
colonne1.setWidth(204);
if (null != this.activeXmlFile){
final Object[] colStrEnable = this.activeXmlFile.getComponentsEnable().toArray();
final Object[] colStrName = this.activeXmlFile.getComponentsName().toArray();
for (int i=0; i< this.activeXmlFile.getComponentsLength() ;i++)
{
TableItem ligne = new TableItem(table,SWT.NONE);
ligne.setText((String)colStrName[i]);
ligne.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
System.out.println("IN");
}
});
if (colStrEnable[i].equals("true")==true){
ligne.setChecked(true);
}else{
ligne.setChecked(false);
} |