File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,11 +54,21 @@ columnModel.setColumnWeight(2, 2);
5454tableView. setColumnModel(columnModel);
5555```
5656
57- ** TableColumnWidthModel**
57+ ** TableColumnDpWidthModel**
58+ This model defines the column widths in a absolute manner. You can define a width in density-independent pixels for each column index.
59+ The default column width is 100dp. You can pass a different default to the constructor.
60+ ``` java
61+ TableColumnDpWidthModel columnModel = new TableColumnDpWidthModel (context, 4 , 200 );
62+ columnModel. setColumnWidth(1 , 300 );
63+ columnModel. setColumnWidth(2 , 250 );
64+ tableView. setColumnModel(columnModel);
65+ ```
66+
67+ ** TableColumnPxWidthModel**
5868This model defines the column widths in a absolute manner. You can define a width in pixels for each column index.
5969The default column width is 200px. You can pass a different default to the constructor.
60- ```
61- TableColumnWidthModel columnModel = new TableColumnWidthModel (4, 350);
70+ ``` java
71+ TableColumnPxWidthModel columnModel = new TableColumnPxWidthModel (4 , 350 );
6272columnModel. setColumnWidth(1 , 500 );
6373columnModel. setColumnWidth(2 , 600 );
6474tableView. setColumnModel(columnModel);
You can’t perform that action at this time.
0 commit comments