@OpenApiAll @Deprecated public class SwingImageIcon extends javax.swing.ImageIcon implements java.io.Serializable, ResizableIcon
Constructor and Description |
---|
SwingImageIcon(byte[] imageData,
java.lang.String description)
Deprecated.
Construct icon from image data
|
SwingImageIcon(java.lang.Class clazz,
java.lang.String location)
Deprecated.
Construct image from resources available to class loader of given class at given location
|
SwingImageIcon(java.lang.Class clazz,
java.lang.String location,
boolean silent)
Deprecated.
Construct image from resources available to class loader of given class at given location
|
SwingImageIcon(java.awt.Image image)
Deprecated.
Constructs a new ImageIcon instance.
|
SwingImageIcon(java.lang.String file)
Deprecated.
Construct image from file
|
SwingImageIcon(java.net.URL url)
Deprecated.
Construct image from url
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Deprecated.
Returns cloned instance of this icon.
|
static javax.swing.ImageIcon |
createImageIcon(java.awt.Component component,
javax.swing.Icon icon)
Deprecated.
Utility method to create an image icon from given icon
|
static javax.swing.ImageIcon |
createImageIcon(javax.swing.Icon icon,
int width,
int height)
Deprecated.
Create image icon of given size from given icon
|
static javax.swing.ImageIcon |
createImageIcon(ResizableIcon icon,
int width,
int height)
Deprecated.
Create image icon of given size from given icon
|
static javax.swing.Icon |
createScaledInstance(javax.swing.Icon icon,
int size)
Deprecated.
Utility method to create a scaled instance of given icon
|
static ResizableIcon |
createScaledInstance(ResizableIcon icon,
int size)
Deprecated.
Utility method to create a scaled instance of given icon
|
java.lang.String |
getLocation()
Deprecated.
|
java.net.URL |
getURL()
Deprecated.
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int w,
int h)
Deprecated.
Draw the icon in the given bounds.
|
getAccessibleContext, getDescription, getIconHeight, getIconWidth, getImage, getImageLoadStatus, getImageObserver, loadImage, paintIcon, setDescription, setImage, setImageObserver, toString
public SwingImageIcon(java.awt.Image image)
public SwingImageIcon(byte[] imageData, java.lang.String description)
imageData
- image datadescription
- descriptionpublic SwingImageIcon(java.lang.String file)
file
- filepublic SwingImageIcon(java.net.URL url)
url
- urlpublic SwingImageIcon(java.lang.Class clazz, java.lang.String location)
clazz
- classlocation
- locationpublic SwingImageIcon(java.lang.Class clazz, java.lang.String location, boolean silent)
clazz
- classlocation
- locationsilent
- if true, does not report to log file about missing icon at given locationpublic void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y, int w, int h)
ResizableIcon
paintIcon
in interface ResizableIcon
c
- the given component.g
- the graphics to paint on.x
- x coordinate.y
- y coordinate.w
- width to paint.h
- height to paint.public java.lang.String getLocation()
public java.net.URL getURL()
public java.lang.Object clone()
ResizableIcon
clone
in interface ResizableIcon
clone
in class java.lang.Object
public static ResizableIcon createScaledInstance(ResizableIcon icon, int size)
icon
- iconsize
- sizepublic static javax.swing.Icon createScaledInstance(javax.swing.Icon icon, int size)
icon
- iconsize
- sizepublic static javax.swing.ImageIcon createImageIcon(@CheckForNull java.awt.Component component, @Nonnull javax.swing.Icon icon)
component
- owner of iconicon
- iconpublic static javax.swing.ImageIcon createImageIcon(javax.swing.Icon icon, int width, int height)
icon
- iconwidth
- widthheight
- heightpublic static javax.swing.ImageIcon createImageIcon(ResizableIcon icon, int width, int height)
icon
- iconwidth
- widthheight
- height