JColChooserDialog dia = new JColChooserDialog(Main.m_mainFrame, dataArray);
dia.setVisible(true);
if (dia.isOk())
{
JColChooserData data = dia.getSelectedItem();
TableColumn tblCol = new TableColumn();
tblCol.setModelIndex(data.m_modelColIndex);
TableColumnModel colModel = m_table.getColumnModel();
colIndex = colModel.getColumnIndexAtX(mouseEv.getX());
m_table.addColumn(tblCol);
m_table.moveColumn(m_table.getColumnCount()-1, colIndex);
if (JExifDataModel.m_colTag[data.m_modelColIndex] == JExifTag.GPSTAG_TAG_MAPLINK)
{
int w = new ImageIcon(Main.m_url_map).getIconWidth();
tblCol.setPreferredWidth(w);
tblCol.setMaxWidth(w);
tblCol.setMinWidth(w);
}
}
}
});
}
if (m_table.getColumnCount() > 1)
{
menuItem = new JStatusMenuItem(Main.getString("menu_tableheader_delete"), Main.getString("statusbar_menutableheader_delete_help"), m_statusBar);
menuItem.addActionListener(new ActionListener()
{
public void actionPerformed (ActionEvent ev)
{
TableColumnModel colModel = m_table.getColumnModel();
int colIndex = colModel.getColumnIndexAtX(mouseEv.getX());
TableColumn tblCol = colModel.getColumn(colIndex);
m_table.removeColumn(tblCol);
}
});
menu.add(menuItem);
}