setVolume(volumeScale.getSelection() - VOLUME_OFFSET);
setVolume(volumeScale.getSelection() * VOLUME_RESOLUTION - VOLUME_OFFSET);
  public void createToolBar() {    ToolBar toolbar = new ToolBar(shell,SWT.FLAT);    ToolItem item;    item = new ToolItem(toolbar,SWT.PUSH);    GridData gridData = new GridData();    gridData.horizontalAlignment = GridData.FILL;    gridData.grabExcessHorizontalSpace = false;    gridData.horizontalSpan = 1;    toolbar.setLayoutData(gridData);    item.setText("This sux");    item.setToolTipText("Stop playing the current track and never play it again.");    item.addSelectionListener(new SelectionAdapter(){      public void widgetSelected(SelectionEvent e){        setRating(getSelectedTrack(), 0);      }    });        item = new ToolItem(toolbar,SWT.PUSH);    item.setText("Yawn");    item.setToolTipText("Rate the current track as 2 out of 10.");    item.addSelectionListener(new SelectionAdapter(){      public void widgetSelected(SelectionEvent e){        setRating(getSelectedTrack(), 2);      }    });    item = new ToolItem(toolbar,SWT.PUSH);    item.setText("Not bad");    item.setToolTipText("Rate the current track as 5 out of 10.");    item.addSelectionListener(new SelectionAdapter(){      public void widgetSelected(SelectionEvent e){        setRating(getSelectedTrack(), 5);      }    });    item = new ToolItem(toolbar,SWT.PUSH);    item.setText("Cool");    item.setToolTipText("Rate the current track as 7 out of 10.");    item.addSelectionListener(new SelectionAdapter(){      public void widgetSelected(SelectionEvent e){        setRating(getSelectedTrack(), 7);      }    });    item = new ToolItem(toolbar,SWT.PUSH);    item.setText("Love it");    item.setToolTipText("Rate the current track as 10 out of 10.");    item.addSelectionListener(new SelectionAdapter(){      public void widgetSelected(SelectionEvent e){        setRating(getSelectedTrack(), 10);      }    });    new ToolItem(toolbar,SWT.SEPARATOR);            pause = new ToolItem(toolbar,SWT.PUSH);    setPaused(false);    pause.addSelectionListener(new SelectionAdapter(){      public void widgetSelected(SelectionEvent e){        setPaused(!isPaused());      }    });     item = new ToolItem(toolbar,SWT.PUSH);    item.setText(">>");    item.setToolTipText("Skip to the next track.");    item.addSelectionListener(new SelectionAdapter(){      public void widgetSelected(SelectionEvent e){        skip();      }    });        volumeScale = new Scale(shell, SWT.HORIZONTAL | SWT.FLAT);    volumeScale.setIncrement(VOLUME_RESOLUTION);    volumeScale.setPageIncrement(VOLUME_RESOLUTION * 2);    volumeScale.setMaximum(VOLUME_SPAN);    volumeScale.setToolTipText("Adjust the volume for the current track.");    //volumeScale.setThumb(1);    volumeScale.addSelectionListener(new SelectionAdapter(){      public void widgetSelected(SelectionEvent e){        setVolume(volumeScale.getSelection() - VOLUME_OFFSET);      }    });    gridData = new GridData();    gridData.horizontalAlignment = GridData.FILL;    gridData.grabExcessHorizontalSpace = false;    gridData.horizontalSpan = 1;    volumeScale.setLayoutData(gridData);  }