Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320647 - [Table] Font of TableItem not preserved
Summary: [Table] Font of TableItem not preserved
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.4 M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-22 11:44 EDT by Benjamin Muskalla CLA
Modified: 2010-08-10 08:57 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2010-07-22 11:44:24 EDT
Specifying a font for a TableItem leads to continuous rendering of this font. In TableItemLCA#preserveValues, we preserve the Font object of this TableItem but in TableItemLCA#writeFont we compare it with the CSS syntax and not the real font object.
Comment 1 Benjamin Muskalla CLA 2010-07-22 11:44:54 EDT
Snippet to reproduce:

Display display = new Display();
    Shell shell = new Shell( display );
    shell.setLayout( new GridLayout( 1, false ) );
    
    Table table = new Table( shell, SWT.SINGLE | SWT.FULL_SELECTION );
    table.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
    table.setLinesVisible( true );
    table.setHeaderVisible( true );
    
    for( int i = 0; i < 10; i++ ) {
      TableItem tableItem = new TableItem( table, SWT.NONE );
      tableItem.setText( 0, "foo" );
      tableItem.setFont( new Font( display, "Arial", 10, SWT.BOLD ) );
    }
    
    shell.pack();
    shell.open();
    while( !shell.isDisposed() ) {
      if( !display.readAndDispatch() )
        display.sleep();
    }
    display.dispose();
    return 0;
Comment 2 Ivan Furnadjiev CLA 2010-08-10 08:57:56 EDT
Fixed in CVS HEAD.