java - RWT TableViewer doesn't refresh cell colors sometimes -
i have tableviewer component in rwt 2.2.0 application represents matrix of values on time (columns) , products (rows). tableviewer in virtual/lazy mode , items in arraylist set via setinput , setitemcount.
some cells need colored in case value contain negative. user has additional command alter starting date of view. in case, repopulate table new data, phone call refresh() , in celllabelprovider.update() method populates values , if necessary, sets color of cell viewercell.setforeground(color) or viewercell.setforeground(null) default.
sometimes, under ie 9, when above time-paging happens, cell text updates cell color remains same until user scrolls away (probably far plenty lazy loading clears internal row cache).
if forcibly setitemcount(0) before setitemcount(actual) instead of refresh, effect goes away, scroll position , selection makes table jump , forth.
is rwt bug, forget phone call or misunderstand how viewercell.setforeground(null) works?
this bug in rwt. before reporting bug, please seek run code latest version of rwt (currently 2.3.1 stable and/or 3.0 m3 development).
if need work around issue in meanwhile, can preserve selection while resetting item count:
iselection selection = tableviewer.getselection(); tableviewer.setitemcount( 0 ); tableviewer.setitemcount( actual ); tableviewer.setselection( selection, true ); java tableviewer eclipse-rap
No comments:
Post a Comment