Community
Participate
Working Groups
Build Identifier: 20100617-1415 When setting org.eclipse.nebula.widgets.grid.GridColumn.setSort(SWT.UP), the SortArrowRenderer paints an arrow/chevron pointing down. Default Eclipse tables render an arrow/chevron pointing in the opposite direction (i.e. upwards). Reproducible: Always Steps to Reproduce: 1. Run SWT Snippet002, observe the direction of the chevron in column header 1 2. Modify Nebula GridSnippet2 and insert "column.setSort(SWT.UP)" at line 40 or later 3. Run GridSnippet2, observe the direction of the chevron in column header 1 They point in different directions for the same sort order setting (SWT.UP)
Created attachment 190992 [details] Screenshot SWT Snippet002
Created attachment 190993 [details] Screenshot Nebula GridSnippet002
A fix is extremely simple. Alternative 1: org.eclipse.nebula.widgets.grid.internal.DefaultColumnHeaderRenderer.paint(GC, Object) On line 225 (in the version I have): arrowRenderer.setSelected(column.getSort() == SWT.UP); change to: arrowRenderer.setSelected(column.getSort() == SWT.DOWN); Alternative 2: org.eclipse.nebula.widgets.grid.internal.SortArrowRenderer.paint(GC, Object) On line 43 (in the version I have): if (isSelected()) change to: if (!isSelected()) For bonus points, expose the SortArrowRender in the API to let me assign my own arrow renderer: gridColumn.getHeaderRenderer().setArrowRenderer(myArrowRenderer)
Bug fixed in Nebula 2.3.0