aMap.put("edit", new AbstractAction("Edit") {
@Override
public void actionPerformed(ActionEvent e) {
List<TrackInfoItem> selectedItems = getSelectedItems(table);
TrackInfoItem firstItem = selectedItems.get(0);
if (!selectedItems.isEmpty()) {
final SingleTagFieldModel tagFieldModel = firstItem.getTracks().size() == 1 ?
new SingleTagFieldModel(firstItem, firstItem.getTracks().get(0)) :
new SingleTagFieldModel(firstItem);
TracksInfoEditFieldDialog dialog = new TracksInfoEditFieldDialog(table, tagFieldModel);
dialog.setVisible(true);
}
}