Package VASSAL.tools.imageop
Class OpIcon
java.lang.Object
javax.swing.ImageIcon
VASSAL.tools.imageop.OpIcon
- All Implemented Interfaces:
Serializable,Accessible,Icon
public class OpIcon extends ImageIcon implements Icon
- Since:
- 3.1.0
- Author:
- Joel Uckelman
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.ImageIcon
ImageIcon.AccessibleImageIcon -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description intgetIconHeight()intgetIconWidth()ImagegetImage()ImageOpgetOp()Returns theImageOpwhich produces this icon'sImage.voidpaintIcon(Component c, Graphics g, int x, int y)voidsetImage(Image img)This method does nothing.voidsetOp(ImageOp op)Sets theImageOpwhich produces this icon'sImage.Methods inherited from class javax.swing.ImageIcon
getAccessibleContext, getDescription, getImageLoadStatus, getImageObserver, loadImage, setDescription, setImageObserver, toString
-
Field Details
-
sop
-
-
Constructor Details
-
OpIcon
public OpIcon()Creates an uninitialized icon. -
OpIcon
Creates anOpIconusing a givenImageOpas its image source.- Parameters:
op- theImageOpto be used by thisOpIcon
-
-
Method Details
-
paintIcon
The given
ImageOpis called asynchronously when painting, so as not to block the Event Dispatch Thread. -
getImage
-
setImage
This method does nothing. It is overridden to prevent the image from being set this way. -
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon- Overrides:
getIconWidthin classImageIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon- Overrides:
getIconHeightin classImageIcon
-
getOp
Returns theImageOpwhich produces this icon'sImage.- Returns:
- the
ImageOpfor thisOpIcon
-
setOp
Sets theImageOpwhich produces this icon'sImage.- Parameters:
op- theImageOp
-