[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Small ComboBoxCellEditor improvement
|
- From: craquerpro@xxxxxxxx (David Perez)
- Date: Mon, 21 Apr 2008 08:33:20 +0000 (UTC)
- Newsgroups: eclipse.platform.swt
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Hi,
I would change this method (Integer --> Number)
protected void doSetValue(Object value) {
Assert.isTrue(comboBox != null && (value instanceof Integer));
selection = ((Integer) value).intValue();
comboBox.select(selection);
}
to:
protected void doSetValue(Object value) {
Assert.isTrue(comboBox != null && (value instanceof Number));
selection = ((Number) value).intValue();
comboBox.select(selection);
}
because e.g. in a JDBC environment, you could have Short, Long, ...
instead of Integer. We would have more genericity with no cost.
SWT developers, what do you think?