Package com.nomagic.ui
Class DoubleSizeImageIcon
java.lang.Object
javax.swing.ImageIcon
com.nomagic.ui.ScalableImageIcon
com.nomagic.ui.DoubleSizeImageIcon
- All Implemented Interfaces:
ResizableIcon
,Serializable
,Cloneable
,Accessible
,Icon
Icon combines two other icons and chooses which one to paint depending on graphics scaling.
Large icon will be used if painting rectangle size is larger than size of small icon.
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Draw the icon in the given bounds.Methods inherited from class com.nomagic.ui.ScalableImageIcon
clone, create, doNotScale, getIconHeight, getIconWidth, getImage, getLocation, getURL, setImage, toImageIcon, toImageIcon, toImageIcon
Methods inherited from class javax.swing.ImageIcon
getAccessibleContext, getDescription, getImageLoadStatus, getImageObserver, loadImage, setDescription, setImageObserver, toString
-
Constructor Details
-
DoubleSizeImageIcon
Constructor.- Parameters:
smallIcon
- small iconlargeIcon
- large icon
-
-
Method Details
-
paintIcon
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
- Overrides:
paintIcon
in classScalableImageIcon
- 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.
-
getLargeIcon
-
getSmallIcon
-
paintIcon
- Specified by:
paintIcon
in interfaceIcon
- Overrides:
paintIcon
in classScalableImageIcon
-