menuItem.setIcon(emptyIcon);
headerMenu.add(menuItem).addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
PlaylistColumn column = new PlaylistColumn();
ColumnDialog dialog = new ColumnDialog(getParentFrame(), "Add Column", column);
if (dialog.showDialog()) {
saveColumns();
columns.add(column);
createDefaultColumnsFromModel();
}
}
});
headerMenu.add(new JMenuItem("Edit Column")).addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (selectedColumn == null) return;
PlaylistColumn column = columns.get(selectedColumn.getModelIndex());
ColumnDialog dialog = new ColumnDialog(getParentFrame(), "Edit Column", column);
if (dialog.showDialog()) {
selectedColumn.setHeaderValue(column.getName());
update();
}
}
});