public Object getValueAt(int row, int col)
{
IObjectList list = ((AkteraQuery) getIObject()).getIObjectListResults();
DataObject akteraQuery = (DataObject) list.get(row);
Object object = new LinkedList(akteraQuery.getAttributes().values()).get(col);
return object;
}
};
akteraQueryTable.setShowGrid(true);
akteraQueryTable.setCellSelectionEnabled(false);
akteraQueryTable.setRowSelectionAllowed(true);
akteraQueryTable.setSelectionMode(0);
akteraQueryTable.setRowHeight(Math.max(akteraQueryTable.getRowHeight() + 4, 24 + 4));
akteraQueryScrollPane.getColumnHeader().setVisible(true);
tableSorter = akteraQueryTableModel.getTableSorter();
akteraQueryTable.setModel(tableSorter);
akteraQueryTableModel.addTableModelListener(this);
akteraQueryTable.addMouseListener(new MouseAdapter()
{
public void mouseClicked(MouseEvent e)
{
int col = akteraQueryTable.columnAtPoint(e.getPoint());
int row = tableSorter.getRealRow(akteraQueryTable.getSelectedRow());
if ((col < 0) || (row < 0))
{
return;
}
IObjectList list = ((AkteraQuery) getIObject()).getIObjectListResults();
DataObject akteraQuery = (DataObject) list.get(row);
String attributeName = (String) new LinkedList(akteraQuery.getAttributes().keySet()).get(col);
if (e.getClickCount() == 2)
{
Properties props = new Properties();