Bold FontSpec [message #1374642] |
Thu, 22 May 2014 14:43  |
Eclipse User |
|
|
|
Hi,
I am trying to have a row in a table where the text is bold.
@Override
protected void execDecorateRow(ITableRow row) throws ProcessingException {
if(/*some condition indicates the row is bold*/( {
row.setFont(boldFontSpec);
}
}
My question is:
how can I create the required boldFondSpec? I do not want to set something else than the style to bold. (I need the the default font name, the default size).
|
|
|
|
|
Re: Bold FontSpec [message #1385194 is a reply to message #1376175] |
Wed, 04 June 2014 17:25  |
Eclipse User |
|
|
|
Hi Jérémie
Just one more thought: if your table cells already have a font which potentially differs from the defaults (i.e. different font or size, or even already styled, say as italic), and you want to preserve these settings and you want to additionally set it to bold, you could use the following pattern:
@Override
protected void execDecorateCell(Cell view, ITableRow row, IColumn<?> col) throws ProcessingException {
row.getCellForUpdate(col).setFont(view.getFont().getBoldCopy());
}
Lukas
|
|
|
Powered by
FUDForum. Page generated in 0.03478 seconds