Package com.nomagic.ui
Class SwingImageIcon
java.lang.Object
javax.swing.ImageIcon
com.nomagic.ui.SwingImageIcon
- All Implemented Interfaces:
ResizableIcon
,Serializable
,Cloneable
,Accessible
,Icon
@OpenApiAll
@Deprecated
public class SwingImageIcon
extends ImageIcon
implements Serializable, ResizableIcon
Deprecated.
Extended version of javax.swing.ImageIcon with some utility methods.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSwingImageIcon
(byte[] imageData, String description) Deprecated.Construct icon from image dataSwingImageIcon
(Image image) Deprecated.Constructs a new ImageIcon instance.SwingImageIcon
(Class clazz, String location) Deprecated.Construct image from resources available to class loader of given class at given locationSwingImageIcon
(Class clazz, String location, boolean silent) Deprecated.Construct image from resources available to class loader of given class at given locationSwingImageIcon
(String file) Deprecated.Construct image from fileSwingImageIcon
(URL url) Deprecated.Construct image from url -
Method Summary
Modifier and TypeMethodDescriptionclone()
Deprecated.Returns cloned instance of this icon.static ImageIcon
createImageIcon
(ResizableIcon icon, int width, int height) Deprecated.Create image icon of given size from given iconstatic ImageIcon
createImageIcon
(Component component, Icon icon) Deprecated.Utility method to create an image icon from given iconstatic ImageIcon
createImageIcon
(Icon icon, int width, int height) Deprecated.Create image icon of given size from given iconstatic ResizableIcon
createScaledInstance
(ResizableIcon icon, int size) Deprecated.Utility method to create a scaled instance of given iconstatic Icon
createScaledInstance
(Icon icon, int size) Deprecated.Utility method to create a scaled instance of given iconDeprecated.getURL()
Deprecated.void
Deprecated.Draw the icon in the given bounds.Methods inherited from class javax.swing.ImageIcon
getAccessibleContext, getDescription, getIconHeight, getIconWidth, getImage, getImageLoadStatus, getImageObserver, loadImage, paintIcon, setDescription, setImage, setImageObserver, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.swing.Icon
getIconHeight, getIconWidth, paintIcon
-
Constructor Details
-
SwingImageIcon
Deprecated.Constructs a new ImageIcon instance. -
SwingImageIcon
Deprecated.Construct icon from image data- Parameters:
imageData
- image datadescription
- description
-
SwingImageIcon
Deprecated.Construct image from file- Parameters:
file
- file
-
SwingImageIcon
Deprecated.Construct image from url- Parameters:
url
- url
-
SwingImageIcon
Deprecated.Construct image from resources available to class loader of given class at given location- Parameters:
clazz
- classlocation
- location
-
SwingImageIcon
Deprecated.Construct image from resources available to class loader of given class at given location- Parameters:
clazz
- classlocation
- locationsilent
- if true, does not report to log file about missing icon at given location
-
-
Method Details
-
paintIcon
Deprecated.Description copied from interface:ResizableIcon
Draw the icon in the given bounds. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.- Specified by:
paintIcon
in interfaceResizableIcon
- Parameters:
c
- the given component.g
- the graphics to paint on.x
- x coordinate.y
- y coordinate.w
- width to paint.h
- height to paint.
-
getLocation
Deprecated.- Returns:
- location
-
getURL
Deprecated.- Returns:
- url
-
clone
Deprecated.Description copied from interface:ResizableIcon
Returns cloned instance of this icon.- Specified by:
clone
in interfaceResizableIcon
- Overrides:
clone
in classObject
- Returns:
- cloned instance.
-
createScaledInstance
Deprecated.Utility method to create a scaled instance of given icon- Parameters:
icon
- iconsize
- size- Returns:
- scaled icon
-
createScaledInstance
Deprecated.Utility method to create a scaled instance of given icon- Parameters:
icon
- iconsize
- size- Returns:
- scaled icon
-
createImageIcon
Deprecated.Utility method to create an image icon from given icon- Parameters:
component
- owner of iconicon
- icon- Returns:
- scaled icon
-
createImageIcon
Deprecated.Create image icon of given size from given icon- Parameters:
icon
- iconwidth
- widthheight
- height- Returns:
- image icon
-
createImageIcon
Deprecated.Create image icon of given size from given icon- Parameters:
icon
- iconwidth
- widthheight
- height- Returns:
- image icon
-
ScalableImageIcon