这是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主题可以详细解释这一点。
谢谢。
发布于 2014-03-18 17:17:13
TextCell只是实现了Cell<String>:http://www.gwtproject.org/javadoc/latest/com/google/gwt/cell/client/TextCell.html
https://stackoverflow.com/questions/22486383
复制相似问题