com.google.gwt.user.cellview.client.DataGrid.addColumnSortHandler()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中com.google.gwt.user.cellview.client.DataGrid.addColumnSortHandler()方法的一些代码示例,展示了DataGrid.addColumnSortHandler()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataGrid.addColumnSortHandler()方法的具体详情如下:
包路径:com.google.gwt.user.cellview.client.DataGrid
类名称:DataGrid
方法名:addColumnSortHandler

DataGrid.addColumnSortHandler介绍

暂无

代码示例

代码示例来源:origin: kaaproject/kaa

/**
 * The constructor.
 */
public AbstractDataProvider(AbstractGrid<T, K> dataGrid, HasErrorMessage hasErrorMessage,
              boolean addDisplay) {
 this.dataGrid = dataGrid;
 callback = new LoadCallback(hasErrorMessage);
 dataGrid.getDataGrid().addColumnSortHandler(this);
 dataGrid.addColumnFilterEventHandler(this);
 if (addDisplay) {
  addDataDisplay(dataGrid.getDataGrid());
 }
}

代码示例来源:origin: marianbuenosayres/jBPM6-Developer-Guide

@Override
public void init(final MessageListPresenter presenter ) {
  this.presenter = presenter;
  listContainer.add( messageListGrid );
  // Set the message to display when the table is empty.
  messageListGrid.setEmptyTableWidget( new Label( constants.NoMessages() ) );
  
  sortHandler = new ListHandler<String>(presenter.getDataProvider().getList());
  messageListGrid.addColumnSortHandler(sortHandler);
  initTableColumns();
  presenter.addDataDisplay(messageListGrid);
}

代码示例来源:origin: org.geomajas/geomajas-puregwt-example-base

public SampleListView(List<ShowcaseSampleDefinition> data, final SampleOverviewPage overviewPage) {
  initWidget(UIBINDER.createAndBindUi(this));
  ProvidesKey<ShowcaseSampleDefinition> sampleKeyProvider = new ProvidesKey<ShowcaseSampleDefinition>() {
    public Object getKey(ShowcaseSampleDefinition item) {
      return item.getTitle();
    }
  };
  // We fill the grid through a list of SamplePanelFactory objects:
  dataProvider = new ListDataProvider<ShowcaseSampleDefinition>(sampleKeyProvider);
  dataProvider.addDataDisplay(grid);
  // Selection: show sample on click
  final SingleSelectionModel<ShowcaseSampleDefinition> selectionModel;
  selectionModel = new SingleSelectionModel<ShowcaseSampleDefinition>(sampleKeyProvider);
  grid.setSelectionModel(selectionModel);
  selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
    public void onSelectionChange(SelectionChangeEvent event) {
      ExampleBase.showSample(selectionModel.getSelectedObject());
    }
  });
  // Add a sort handler:
  sortHandler = new ListHandler<ShowcaseSampleDefinition>(dataProvider.getList());
  grid.addColumnSortHandler(sortHandler);
  // Initialize the grid columns:
  initColumns();
  // Apply the entire data-set:
  setData(data);
}

代码示例来源:origin: org.geomajas/geomajas-gwt-example-base

public SampleListView(List<ShowcaseSampleDefinition> data, final SampleOverviewPage overviewPage) {
  initWidget(UIBINDER.createAndBindUi(this));
  ProvidesKey<ShowcaseSampleDefinition> sampleKeyProvider = new ProvidesKey<ShowcaseSampleDefinition>() {
    public Object getKey(ShowcaseSampleDefinition item) {
      return item.getTitle();
    }
  };
  // We fill the grid through a list of SamplePanelFactory objects:
  dataProvider = new ListDataProvider<ShowcaseSampleDefinition>(sampleKeyProvider);
  dataProvider.addDataDisplay(grid);
  // Selection: show sample on click
  final SingleSelectionModel<ShowcaseSampleDefinition> selectionModel;
  selectionModel = new SingleSelectionModel<ShowcaseSampleDefinition>(sampleKeyProvider);
  grid.setSelectionModel(selectionModel);
  selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
    public void onSelectionChange(SelectionChangeEvent event) {
      ExampleBase.showSample(selectionModel.getSelectedObject());
    }
  });
  // Add a sort handler:
  sortHandler = new ListHandler<ShowcaseSampleDefinition>(dataProvider.getList());
  grid.addColumnSortHandler(sortHandler);
  // Initialize the grid columns:
  initColumns();
  // Apply the entire data-set:
  setData(data);
}

代码示例来源:origin: org.geomajas/geomajas-client-gwt2-example-base

public SampleListView(List<ShowcaseSampleDefinition> data, final SampleOverviewPage overviewPage) {
  initWidget(UIBINDER.createAndBindUi(this));
  ProvidesKey<ShowcaseSampleDefinition> sampleKeyProvider = new ProvidesKey<ShowcaseSampleDefinition>() {
    public Object getKey(ShowcaseSampleDefinition item) {
      return item.getTitle();
    }
  };
  // We fill the grid through a list of SamplePanelFactory objects:
  dataProvider = new ListDataProvider<ShowcaseSampleDefinition>(sampleKeyProvider);
  dataProvider.addDataDisplay(grid);
  // Selection: show sample on click
  final SingleSelectionModel<ShowcaseSampleDefinition> selectionModel;
  selectionModel = new SingleSelectionModel<ShowcaseSampleDefinition>(sampleKeyProvider);
  grid.setSelectionModel(selectionModel);
  selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
    public void onSelectionChange(SelectionChangeEvent event) {
      ExampleBase.showSample(selectionModel.getSelectedObject());
    }
  });
  // Add a sort handler:
  sortHandler = new ListHandler<ShowcaseSampleDefinition>(dataProvider.getList());
  grid.addColumnSortHandler(sortHandler);
  // Initialize the grid columns:
  initColumns();
  // Apply the entire data-set:
  setData(data);
}

相关文章