Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Bold FontSpec(I need to create a TableRow where the font is bold.)
Bold FontSpec [message #1374642] Thu, 22 May 2014 14:43 Go to next message
Eclipse UserFriend
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 #1375804 is a reply to message #1374642] Fri, 23 May 2014 02:11 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jérémie,

did you try
row.setFont(FontSpec.parse("bold"));
?

Best regards,
Matthias
Re: Bold FontSpec [message #1376175 is a reply to message #1375804] Fri, 23 May 2014 05:43 Go to previous messageGo to next message
Eclipse UserFriend
This is what I was looking for !

Thank you.
Re: Bold FontSpec [message #1385194 is a reply to message #1376175] Wed, 04 June 2014 17:25 Go to previous message
Eclipse UserFriend
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
Previous Topic:Export Webservice from Scout and deploy on other Server
Next Topic:Transform a formData to text
Goto Forum:
  


Current Time: Tue Jul 01 15:53:42 EDT 2025

Powered by FUDForum. Page generated in 0.03478 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top