Public Methods | |
void | showImage (HxCorba.ImageRep newImg) |
void | clear () |
void | paint (Graphics g) |
|
00018 { 00019 if(newImg == null) _image = null; 00020 else { 00021 int w = newImg.dimensionSize(1); 00022 int h = newImg.dimensionSize(2); 00023 double s = Math.min(getSize().width / (double)w, 00024 getSize().height / (double)h); 00025 _imageW = (int)(s * w); 00026 _imageH = (int)(s * h); 00027 HxCorba.ImageRep smallImg = newImg.scale(s,s, HxCorba.GeoIntType.LINEAR); 00028 _image = Images.imageFromStub(smallImg); 00029 } 00030 repaint(); 00031 } |
|
00034 { 00035 _image = null; 00036 repaint(); 00037 } |
|
00040 { 00041 if(_image != null) 00042 g.drawImage(_image, (getSize().width - _imageW) / 2, 00043 (getSize().height - _imageH) / 2, this); 00044 } |