I think this is too unclear. I think it would be better to set by type or have 3 functions:
Code:
public int Display.setIcon16x16(ByteBuffer iconData, int width, int height);
public int Display.setIcon32x32(ByteBuffer iconData, int width, int height);
public int Display.setIcon128x128(ByteBuffer iconData, int width, int height);
The javadoc would make it clear that the functions would scale the image if it don't fit.
The problem with this, is that it's bloat
ish and I really prefer a cleaner api by not doing like cocoa (for example stringByAbbreviatingWithTildeInPath style method calls).
And forwarding a bit into the future, we would have 7 setIcon methods because of ports... whereas using 1 method would just require an updated javadoc
I am also a bit undecided whether or not an implementation should scale the images supplied, instead of forcing the developer to pass correct data. The former can lead to ugly icons and/or unexpected behaviour, wheread the latter will lead to the expected behaviour, but mean that the dev have to supply proper icons (which IMO is a good thing).