It is a RCP application, you have a (a) LIST of Names, this is downloaded by means of a FOR loop.
That is, they are menu items and they are located on the left of the screen with their respective layer (composite).
Now, this works, the difficulty / what is needed here is that when you double-click on an Item it receives the "SWT.BOLD" feature and when you click on another Item, the previous one receives SWT.NONE and the chosen SWT.BOLD ....
Here the code:
for (int i = 0; i < 2; i++) {
final Label l1 = neueLabel(shell, "label "+i, i);
l1.addMouseListener(new MouseAdapter() {
@Override
public void mouseDoubleClick(MouseEvent e) {
if(e.button==1)
l1.setFont(SWTResourceManager.getFont("Segoe UI", 9, SWT.BOLD));
}
});
}
Thank you in advance for an answer. Ben