RowLayout rowLayout = new RowLayout(SWT.HORIZONTAL);
rowLayout.spacing = 20;
optionGroup.setLayout(rowLayout);
final Button addTreeNodeSelectionListenerButton = new Button(optionGroup, SWT.PUSH);
final Label label = new Label(optionGroup, SWT.NONE);
addTreeNodeSelectionListenerButton.setText("Add tree node selection listener");
iTreeNodeSelectionListener = new ITreeNodeSelectionListener() {
@Override
public void selectionChanged(TreeNodeSelectionEvent event) {
label.setText("Add tree node selection listener");
ITreeTestPanel.this.layout();
}
};
addTreeNodeSelectionListenerButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
label.setText("Add listener");
theComponent.addTreeNodeSelectionListener(iTreeNodeSelectionListener);
}
});
}