Mercurial > projects > dwt-addons
diff dwtx/jface/viewers/DelegatingStyledCellLabelProvider.d @ 104:04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
These new wrappers now use the tango.util.containers instead of the tango.util.collections.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 07 Aug 2008 15:01:33 +0200 |
parents | 7ffeace6c47f |
children |
line wrap: on
line diff
--- a/dwtx/jface/viewers/DelegatingStyledCellLabelProvider.d Sun Aug 03 17:01:51 2008 +0200 +++ b/dwtx/jface/viewers/DelegatingStyledCellLabelProvider.d Thu Aug 07 15:01:33 2008 +0200 @@ -26,6 +26,7 @@ import dwt.graphics.Image; import dwt.dwthelper.utils; +import dwtx.dwtxhelper.Collection; /** * A {@link DelegatingStyledCellLabelProvider} is a @@ -112,10 +113,10 @@ StyledString styledString = getStyledText(element); String newText= styledString.toString(); - + StyleRange[] oldStyleRanges= cell.getStyleRanges(); StyleRange[] newStyleRanges= isOwnerDrawEnabled() ? styledString.getStyleRanges() : null; - + if (!Arrays.equals(oldStyleRanges, newStyleRanges)) { cell.setStyleRanges(newStyleRanges); if (cell.getText().equals(newText)) { @@ -123,13 +124,13 @@ cell.setText(""); //$NON-NLS-1$ } } - + cell.setText(newText); cell.setImage(getImage(element)); cell.setFont(getFont(element)); cell.setForeground(getForeground(element)); cell.setBackground(getBackground(element)); - + // no super call required. changes on item will trigger the refresh. }