MenuItem volumeDownItem = new MenuItem(volumeItemMenu, SWT.PUSH);
volumeDownItem.setText(Messages.getString("TrayController.VolumeDown")); //$NON-NLS-1$
volumeDownItem.setImage(_volumeDownImage);
volumeDownItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
new SetVolumeAction(Controller.getInstance().getPreferenceStore().getInt(PreferenceConstants.PLAYBACK_VOLUME) - 10).run();
}
});
MenuItem volumeUpItem = new MenuItem(volumeItemMenu, SWT.PUSH);
volumeUpItem.setText(Messages.getString("TrayController.VolumeUp")); //$NON-NLS-1$
volumeUpItem.setImage(_volumeUpImage);
volumeUpItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
new SetVolumeAction(Controller.getInstance().getPreferenceStore().getInt(PreferenceConstants.PLAYBACK_VOLUME) + 10).run();
}
});
MenuItem volumeMuteItem = new MenuItem(volumeItemMenu, SWT.PUSH);
volumeMuteItem.setText(Messages.getString("TrayController.VolumeMute")); //$NON-NLS-1$
volumeMuteItem.setImage(_volumeMuteImage);
volumeMuteItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
new VolumeMuteAction().run();
}
});
new MenuItem(volumeItemMenu, SWT.SEPARATOR);
MenuItem volume100Item = new MenuItem(volumeItemMenu, SWT.PUSH);
volume100Item.setText(Messages.getString("TrayController.Volume100")); //$NON-NLS-1$
volume100Item.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
new SetVolumeAction(100).run();
}
});
MenuItem volume75Item = new MenuItem(volumeItemMenu, SWT.PUSH);
volume75Item.setText(Messages.getString("TrayController.Volume75")); //$NON-NLS-1$
volume75Item.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
new SetVolumeAction(75).run();
}
});
MenuItem volume50Item = new MenuItem(volumeItemMenu, SWT.PUSH);
volume50Item.setText(Messages.getString("TrayController.Volume50")); //$NON-NLS-1$
volume50Item.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
new SetVolumeAction(50).run();
}
});
MenuItem volume25Item = new MenuItem(volumeItemMenu, SWT.PUSH);
volume25Item.setText(Messages.getString("TrayController.Volume25")); //$NON-NLS-1$
volume25Item.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
new SetVolumeAction(25).run();
}
});
new MenuItem(trayMenu, SWT.SEPARATOR);