2016-07-26 8 views

答えて

1

使用に従います。次のスニペットは、NatTableの例の_5052_RowSelectionExampleから抜粋したものです。

// use a RowSelectionModel that will perform row selections and is able 
// to identify a row via unique ID 
selectionLayer.setSelectionModel(new RowSelectionModel<Person>(
selectionLayer, bodyDataProvider, new IRowIdAccessor<Person>() { 

    @Override 
    public Serializable getRowId(Person rowObject) { 
     return rowObject.getId(); 
    } 

})); 

// register the DefaultRowSelectionLayerConfiguration that contains the 
// default styling and functionality bindings (search, tick update) 
// and different configurations for a move command handler that always 
// moves by a row and row only selection bindings 
selectionLayer.addConfiguration(new DefaultRowSelectionLayerConfiguration()); 

NatTableについて学ぶ最も良い方法は、NatTable Examplesアプリケーションを見ることです。これはNatTable homepageを介してWebStartアプリケーションとして利用できます。または、WebStartが機能しない場合は、examples jarファイルをダウンロードしてcommand lineから実行できます。

チュートリアルの例の下に位置しています見ての例 - >レイヤー - >選択 - あなたの現在の設定について> RowSelectionExample

関連する問題