Package com.nomagic.ui
Class ResizableIconAdapter
java.lang.Object
com.nomagic.ui.ResizableIconAdapter
- All Implemented Interfaces:
ResizableIcon,Cloneable,Icon
An adapter of simple
Icon to a ResizableIcon-
Method Summary
Modifier and TypeMethodDescriptionclone()Returns cloned instance of this icon.intintvoidvoidDraw the icon in the given bounds.static ResizableIcontoResizableIcon(Icon icon) Create an adapter for a given icon.
-
Method Details
-
toResizableIcon
Create an adapter for a given icon.- Parameters:
icon- icon- Returns:
- adapted icon
-
paintIcon
-
paintIcon
Description copied from interface:ResizableIconDraw 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:
paintIconin 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.
-
clone
Description copied from interface:ResizableIconReturns cloned instance of this icon.- Specified by:
clonein interfaceResizableIcon- Overrides:
clonein classObject- Returns:
- cloned instance.
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-