Class ImageIcon
java.lang.Object
vaadinx.swing.ImageIcon
- All Implemented Interfaces:
Serializable, Accessible, Icon
Emulator for
ImageIcon. Holds a JDK-side
ImageIcon delegate so all the load-from-file /
load-from-bytes / load-from-URL / load-from-Image construction shapes
Just Work, and so getImage() hands back a real
Image the icon-rendering bridge can encode.
Implements Icon (paintIcon's signature
references Component, which is why we can't reuse
javax.swing.ImageIcon directly under D_whitelist_porting's port rule). The
paintIcon body itself is a EHelper.onUnimplemented(String, String, Object...) stub
— Path 3 (offscreen-paint of arbitrary Icon impls) is deferred;
ImageIcon's data path is Path 1 and
lives in the icon-rendering bridge, not in this class.
Construction shapes match javax.swing.ImageIcon verbatim,
so post-import-swap user code (e.g. new ImageIcon("logo.png"))
compiles unchanged.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasJdk()Accessor for the underlying JDKImageIcon.intintgetImage()intvoidvoidsetDescription(String description) voidvoidsetImageObserver(ImageObserver observer) toString()
-
Constructor Details
-
ImageIcon
public ImageIcon() -
ImageIcon
public ImageIcon(byte[] imageData) -
ImageIcon
-
ImageIcon
-
ImageIcon
-
ImageIcon
-
ImageIcon
-
ImageIcon
-
ImageIcon
-
ImageIcon
-
-
Method Details
-
getImage
-
setImage
-
getDescription
-
setDescription
-
getImageLoadStatus
public int getImageLoadStatus() -
getImageObserver
-
setImageObserver
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-
paintIcon
-
asJdk
-
toString
-
getAccessibleContext
- Specified by:
getAccessibleContextin interfaceAccessible
-