prefsDropDown.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
if (event.detail == SWT.ARROW) {
// Arrow clicked, show drop down menu
Rectangle itemBounds = prefsDropDown.getBounds();
Point point = toolBar.toDisplay(itemBounds.x, itemBounds.y
+ itemBounds.height);
prefsMenu.setLocation(point);
prefsMenu.setVisible(true);
} else {
// Button clicked, cycle to next option