这是GWT Javadoc迷你教程中代码的样子:
TextCell textCell = new TextCell();
CellList<String> cellList = new CellList<String>(textCell);
我问这个是因为我看不到TextCell与它与CellList构造函数要求之间的关系,因此,我无法看到textCell如何满足CelList要求。
CellList构造函数是:
CellList(Cell<T> cell)
Construct a new CellList.
CellList(Cell<T> cell, CellList.Resources resources)
Construct a new CellList with the specified CellList.Resources.
CellList(Cell<T> cell, CellList.Resources resources, ProvidesKey<T> keyProvider)
Construct a new CellList with the specified CellList.Resources and key provider.
CellList(Cell<T> cell, ProvidesKey<T> keyProvider)
Construct a new CellList with the specified key provider.
我的问题旨在基本了解其工作原理,如果你们可以告诉我哪个Java或OOP主题可以解释这个问题。
谢谢。
答案 0 :(得分:1)
TextCell
只是实现Cell<String>
:http://www.gwtproject.org/javadoc/latest/com/google/gwt/cell/client/TextCell.html