
|
If you were logged in you would be able to see more operations.
|
|
|
- extend DefaultComboBoxCellRenderer
- define a non-empty constructor
- overwrite typeString and therefore define a own UIProxy component or
- overwrite any or all of the ICellComponent methods
- set the renderer on a combo box --> renderer is ignored (createBasicObject() and restoreState() are never called)
At least an error (or even a runtime exception) should be displayed explaining the situation.
|
|
Description
|
- extend DefaultComboBoxCellRenderer
- define a non-empty constructor
- overwrite typeString and therefore define a own UIProxy component or
- overwrite any or all of the ICellComponent methods
- set the renderer on a combo box --> renderer is ignored (createBasicObject() and restoreState() are never called)
At least an error (or even a runtime exception) should be displayed explaining the situation. |
Show » |
|
a template copy of cell renderer component, which is passed in. The template copy is created
via c.getClass().newInstance() but this does not work if
If the former does not work, then createTemplate()tries to create a copy via
c.getClass().getSuperclass().newInstance() but then, the template copy does not
have the right type anymore.
(Using ... getSuperclass().newInstance() acts as "workaround" if the c has an
anonymous (and thus private) class type.
Currently there is no good point, where ULC could a give a hint to the programmer (such
as throwing an exception) in case this behaviour is undesired.
A possible solution would be to offer a new interface e.g.:
public interface ITemplateComponent {
ICellComponent createTemplateCopy();
}
An extension writer could make the cell component implement this interface and then
CellComponentTemplateStorage.createTemplate(ICellComponent c)
could try c.createTemplateCopy() if c implements ITemplateComponent. Otherwise it would
work as before.
Adding the new interface is considered as adding too much additional complexity for
a workaround and therefore it is rejected.