recordColumns.addColumn(column);
// True time-weighted rate of return
column = new Column("twror", Messages.ColumnTWROR, SWT.RIGHT, 50); //$NON-NLS-1$
column.setMenuLabel(Messages.ColumnTWROR_Description);
column.setLabelProvider(new ColumnLabelProvider()
{
@Override
public String getText(Object r)
{
return Values.Percent2.format(((SecurityPerformanceRecord) r).getTrueTimeWeightedRateOfReturn());
}
@Override
public Color getForeground(Object e)
{
return getColor(((SecurityPerformanceRecord) e).getIrr());
}
});
column.setSorter(ColumnViewerSorter.create(SecurityPerformanceRecord.class, "trueTimeWeightedRateOfReturn")); //$NON-NLS-1$
recordColumns.addColumn(column);
// internal rate of return
column = new Column("izf", Messages.ColumnIRR, SWT.RIGHT, 50); //$NON-NLS-1$
column.setMenuLabel(Messages.ColumnIRR_MenuLabel);
column.setLabelProvider(new ColumnLabelProvider()
{
@Override
public String getText(Object r)
{
return Values.Percent2.format(((SecurityPerformanceRecord) r).getIrr());
}
@Override
public Color getForeground(Object e)
{
return getColor(((SecurityPerformanceRecord) e).getIrr());
}
});
column.setSorter(ColumnViewerSorter.create(SecurityPerformanceRecord.class, "irr")); //$NON-NLS-1$
recordColumns.addColumn(column);
// cost value - fifo
column = new Column("pv", Messages.ColumnPurchaseValue, SWT.RIGHT, 75); //$NON-NLS-1$
column.setDescription(Messages.ColumnPurchaseValue_Description);
column.setLabelProvider(new ColumnLabelProvider()
{
@Override
public String getText(Object r)
{
return Values.Amount.format(((SecurityPerformanceRecord) r).getFifoCost());
}
});
column.setSorter(ColumnViewerSorter.create(SecurityPerformanceRecord.class, "fifoCost")); //$NON-NLS-1$
recordColumns.addColumn(column);
// cost value per share - fifo
column = new Column("pp", Messages.ColumnPurchasePrice, SWT.RIGHT, 75); //$NON-NLS-1$
column.setDescription(Messages.ColumnPurchasePrice_Description);
column.setLabelProvider(new ColumnLabelProvider()
{
@Override
public String getText(Object r)
{
return Values.Amount.format(((SecurityPerformanceRecord) r).getFifoCostPerSharesHeld());
}
});
column.setSorter(ColumnViewerSorter.create(SecurityPerformanceRecord.class, "fifoCostPerSharesHeld")); //$NON-NLS-1$
recordColumns.addColumn(column);
// Gesamtsumme der erhaltenen Dividenden
column = new Column("sumdiv", Messages.ColumnDividendSum, SWT.RIGHT, 80); //$NON-NLS-1$
column.setMenuLabel(Messages.ColumnDividendSum_MenuLabel);
column.setGroupLabel(Messages.GroupLabelDividends);
column.setLabelProvider(new ColumnLabelProvider()
{
@Override
public String getText(Object r)
{
return Values.Amount.format(((SecurityPerformanceRecord) r).getSumOfDividends());
}
});
column.setSorter(ColumnViewerSorter.create(SecurityPerformanceRecord.class, "sumOfDividends")); //$NON-NLS-1$
recordColumns.addColumn(column);
// market value
column = new Column("mv", Messages.ColumnMarketValue, SWT.RIGHT, 75); //$NON-NLS-1$
column.setLabelProvider(new ColumnLabelProvider()
{
@Override
public String getText(Object r)
{
return Values.Amount.format(((SecurityPerformanceRecord) r).getMarketValue());
}
});
column.setSorter(ColumnViewerSorter.create(SecurityPerformanceRecord.class, "marketValue")); //$NON-NLS-1$
recordColumns.addColumn(column);
// delta
column = new Column("delta", Messages.ColumnDelta, SWT.RIGHT, 100); //$NON-NLS-1$
column.setDescription(Messages.ColumnDelta_Description);
column.setLabelProvider(new ColumnLabelProvider()
{
@Override
public String getText(Object r)
{
return Values.Amount.format(((SecurityPerformanceRecord) r).getDelta());
}
@Override
public Color getForeground(Object e)
{
return getColor(((SecurityPerformanceRecord) e).getDelta());
}
});
column.setSorter(ColumnViewerSorter.create(SecurityPerformanceRecord.class, "delta")); //$NON-NLS-1$
recordColumns.addColumn(column);
// fees paid
column = new Column("fees", Messages.ColumnFees, SWT.RIGHT, 80); //$NON-NLS-1$
column.setDescription(Messages.ColumnFees_Description);
column.setLabelProvider(new ColumnLabelProvider()
{
@Override
public String getText(Object r)
{
return Values.Amount.format(((SecurityPerformanceRecord) r).getFees());
}
});
column.setSorter(ColumnViewerSorter.create(SecurityPerformanceRecord.class, "fees")); //$NON-NLS-1$
column.setVisible(false);
recordColumns.addColumn(column);
// taxes paid
column = new Column("taxes", Messages.ColumnTaxes, SWT.RIGHT, 80); //$NON-NLS-1$
column.setLabelProvider(new ColumnLabelProvider()
{
@Override
public String getText(Object r)
{
return Values.Amount.format(((SecurityPerformanceRecord) r).getTaxes());