Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/369.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java GWT CellTable-从标题中删除排序箭头_Java_Gwt - Fatal编程技术网

Java GWT CellTable-从标题中删除排序箭头

Java GWT CellTable-从标题中删除排序箭头,java,gwt,Java,Gwt,我想从CellTable的标题中删除排序箭头。(下面红色圆圈中的一个,来自GWT showcase:) 但我仍然想要CellTable的排序功能 可能吗?有什么想法吗?未经测试,可能有点不对劲,但您可以尝试覆盖默认样式以返回空白图像。扩展以覆盖CellTable使用的ImageResources: public interface TableResources extends CellTable.Resources { @Source("blank.jpg") ImageRes

我想从CellTable的标题中删除排序箭头。(下面红色圆圈中的一个,来自GWT showcase:)

但我仍然想要CellTable的排序功能


可能吗?有什么想法吗?

未经测试,可能有点不对劲,但您可以尝试覆盖默认样式以返回空白图像。扩展以覆盖CellTable使用的ImageResources:

public interface TableResources extends CellTable.Resources {
    @Source("blank.jpg")
    ImageResource cellTableSortAscending();

    @Source("blank.jpg")
    ImageResource cellTableSortDescending();
 }
创建“blank.jpg”,并将其放入与此接口相同的资源包中。

getDataGrid().getColumnSortList().clear()


删除排序箭头

谢谢!工作如期!但是方法如下:
publicmageresource celltablesortsupsing()
公共图像资源celltablesortdescing()无论如何,感谢您的帮助。正在为DataGrid(而不是CellTable)寻找相应解决方案的人员:使用“public ImageResource dataGridSortAscending();”和“public ImageResource dataGridSortDescending();”方法