| Issue 153: | Decorate (chain) Cell Editors Easily | |
| 1 person starred this issue and may be notified of changes. | Back to list |
The CellEditors are very easy to decorate, but in the api there is no easy (or obvious) way to take advantage of that. I would like to exploit that pattern as much as possible.
Nov 5, 2008
#1
bgo...@e1b.org
Nov 6, 2008
The most consistent way to handle it would be to have a CellEditorSupport interface that has getters and setters of a CellEditor. The AbstractCellEditor would implement this interface, which is what most CellEditor's should be using. The work involved would be in injecting each CellEditor into the next and in correct order. It would also have to make sure that the SupportUtils is injecting the classes that are being requested (as you pointed out). Its kind of interesting that a CellEditor could have CellEditorSupport but it also shows how well the decorator pattern works.
Nov 7, 2008
Right on... and then you could decorate columns like this: Utils.decorateCellEditor(column, wrapper); the code in decorateCellEditor might be something like: CellEditor original = column.getCellRenderer().getCellEditor(); SupportUtils.setCellEditor(wrapper, original); column.getCellRenderer().setCellEditor(wrapper); (just an example, might have bugs!) Anyhow, placing method(s) like this in the API and/or on the table facade might be really helpful.
Mar 10, 2011
I still like the idea, but I do not think realistically that I will get to it...
Status:
WontFix
|