This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Please move these classes to Open API, so I can suggest other module owners to use them ;-)
So, I think classes are ready to move to openide. I just want you to know public API (changed a little bit from core version). I have made TableSheet package private as Yarda suggested. It doesn't work with Explorer manager. I think that its subclass should add that behavior (TreeSheetView?). public class org.openide.explorer.view.NodeTableModel extends AbstractTableModel { public void setNodes(Node[] nodes); public void setProperties(Node.Property[] props); protected Node.Property getPropertyFor(Node node, Node.Property prop); } public org.openide.explorer.TreeTableView extends BeanTreeView { public TreeTableView(); public TreeTableView(NodeTableModel ntm); public void setProperties(Node.Property[] props); public void setTableAutoResizeMode(int mode); ?? due to ui tuning public TableColumn getTableColumn(Node.Property prop); ?? due to ui tuning public void setTreeWidth(int width); ?? due to ui tuning } public org.openide.explorer.ListTableView extends ListView { public ListTableView(); public ListTableView(NodeTableModel ntm); public void setProperties(Node.Property[] props); public void setTableAutoResizeMode(int mode); ?? due to ui tuning public TableColumn getTableColumn(Node.Property); ?? due to ui tuning public void setListWidth(int width); ?? due to ui tuning }
"public TableColumn getTableColumn(Node.Property); ?? due to ui tuning" is a bit dangerous. If you need it just to set preferred size, etc. It is ok, but the TableColumn offers a lot of additional methods for example setModelIndex and I am not sure if this should be exposed to publics. "protected TableColumn createTableColumn (Node.Property)" that would be called just once for each property would be better, but still this results in a need to subclass if somebody wants to change settings. Btw. setProperties also is not something perfect, it just delegates to NodeTableModel, so why the model itself is not used to change the properties? IMHO autoresizemode & tree/list width can be treated as regular properties, just make those methods final.
OK, what about regular properties: tableAutoResizeMode, (tree|list)PreferredWidth and indexed property: tableColumnPreferredWidth I will make setters and getters for them. With setTableColumnPreferredWidth(int index, int width) I can live without access to TableColumn. I think index is better then Node.Property for identyfing column. Or not? I can get off setProperties() but then constructor without NodeTableModel doesn't make sense.
Target milestone -> 3.3
Classes were moved.