我需要在Blackberry JDE中添加带有图像的ObjectListField
答案 0 :(得分:0)
http://developerlife.com/tutorials/?p=898
public void drawListRow(ListField list, Graphics g, int index, int y, int w) {
String text = (String) _data.elementAt(index);
// draw the text /w ellipsis if it's too long...
g.drawText(text,
_defaultRowWidth + _textImagePadding, y,
DrawStyle.LEADING | DrawStyle.ELLIPSIS,
w - _defaultRowWidth - _textImagePadding);
// draw the to the left of the text...
g.drawBitmap(0, y, _bitmap.getWidth(), _bitmap.getHeight(), _bitmap, 0, 0);
}