The code is fairly straightforward, except perhaps for the call to convertColumnIndexToModel. That call is necessary because if the user moves the columns around, the view s Index for the column doesn t match the model s Index for the column. For example, the user might drag the Vegetarian column (which the model considers to be at Index 4) so it s displayed as the first column — at view Index 0. Since prepareRenderer gives us the view Index, we need to translate the view Index to a model Index so we can be sure we re dealing with the intended column
標簽:
convertColumnIndexToModel
straightforward
perhaps
fairly
上傳時間:
2013-12-10
上傳用戶:it男一枚