fNewState.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if (fNewState.getSelection() && !fUnreadState.getSelection()) {
Point toolTipLocation = toDisplay(fUnreadState.getLocation());
toolTipLocation.y += fUnreadState.getSize().y;
if (Application.IS_WINDOWS)
toolTipLocation.x += 5;
else if (Application.IS_LINUX)
toolTipLocation.x += 12;
unreadStateToolTip.setLocation(toolTipLocation);
unreadStateToolTip.setVisible(true);
} else {
unreadStateToolTip.setVisible(false);
}
}
});
fUnreadState.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if (fUnreadState.getSelection() && !fNewState.getSelection()) {
Point toolTipLocation = toDisplay(fNewState.getLocation());
toolTipLocation.y += fNewState.getSize().y;
if (Application.IS_WINDOWS)
toolTipLocation.x += 5;
else if (Application.IS_LINUX)
toolTipLocation.x += 12;