return (image == null) ? 0 : image.getHeight();
}
@Override
public Dimensions getPreferredSize() {
ImageView imageView = (ImageView)getComponent();
Image image = imageView.getImage();
return (image == null) ? new Dimensions(0, 0) : new Dimensions(image.getWidth(),
image.getHeight());
}