@OpenApiAll public class ResizableIconAdapter extends java.lang.Object implements ResizableIcon
Icon
to a ResizableIcon
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns cloned instance of this icon.
|
int |
getIconHeight() |
int |
getIconWidth() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int w,
int h)
Draw the icon in the given bounds.
|
static ResizableIcon |
toResizableIcon(javax.swing.Icon icon)
Create an adapter for a given icon.
|
public static ResizableIcon toResizableIcon(javax.swing.Icon icon)
icon
- iconpublic void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon
public void paintIcon(@CheckForNull 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.Object clone()
ResizableIcon
clone
in interface ResizableIcon
clone
in class java.lang.Object
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon