if (isMac()) {    MenuItem view = new MenuItem(menu, SWT.CASCADE); skinManager.addItem(view, "toolbar.menu_title.sort");  Menu mView = new Menu(view); view.setMenu(mView);  MenuItem mSortArtist = new MenuItem(mView, SWT.PUSH); mSortArtist.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { trackTable.setSortColumn(0); } }); skinManager.addItem(mSortArtist, "TrackTable.Heading.Artist");  MenuItem mSortTrack = new MenuItem(mView, SWT.PUSH); mSortTrack.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { trackTable.setSortColumn(1); } }); skinManager.addItem(mSortTrack, "TrackTable.Heading.Track");  MenuItem mSortRating = new MenuItem(mView, SWT.PUSH); mSortRating.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { trackTable.setSortColumn(2); } }); skinManager.addItem(mSortRating, "TrackTable.Heading.Rating");  MenuItem mSortPlays = new MenuItem(mView, SWT.PUSH); mSortPlays.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { trackTable.setSortColumn(3); } }); skinManager.addItem(mSortPlays, "TrackTable.Heading.Plays");  MenuItem mSortLast = new MenuItem(mView, SWT.PUSH); mSortLast.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { trackTable.setSortColumn(4); } }); skinManager.addItem(mSortLast, "TrackTable.Heading.Last");  }
  public void createTableMenu() {    Menu menu = new Menu(shell, SWT.POP_UP);    trackTable.setMenu(menu);    MenuItem info = new MenuItem(menu, SWT.NONE);    info.addArmListener(new ToolTipArmListener(Resources.getString("button.info.tooltip")));    final Client clientToPass = this;    info.addSelectionListener(new SelectionAdapter() {        public void widgetSelected(SelectionEvent e) {          Track track = trackTable.getSelectedTrack();          if (track == null)            return;                    TrackInfoDialog trackInfoDialog =             new TrackInfoDialog(display, shell);          trackInfoDialog.displayTrackInfo(track, clientToPass);           }      });    skinManager.addItem(info, "button.info");    for (int i = 0; i < ratingFunctions.length; i++) {      RatingFunction rf = ratingFunctions[i];      MenuItem item = new MenuItem(menu, SWT.NONE);      item.addArmListener(new ToolTipArmListener(Resources.getString(rf.getName() + ".tooltip")));      final int value = rf.getValue();      item.addSelectionListener(new SelectionAdapter() {        public void widgetSelected(SelectionEvent e) {          setRating(trackTable.getSelectedTrack(), value);        }      });      skinManager.addItem(item, rf.getName());    }  }