Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 18:43 Go to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
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 06:11 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
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 09:43 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
This is what I was looking for !

Thank you.
Re: Bold FontSpec [message #1385194 is a reply to message #1376175] Wed, 04 June 2014 21:25 Go to previous message
Lukas Huser is currently offline Lukas HuserFriend
Messages: 42
Registered: March 2010
Member
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 Apr 23 15:59:25 GMT 2024

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

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

Back to the top