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 int
getIconHeight()
int
getIconWidth()
Image
getImage()
ImageOp
getOp()
Returns theImageOp
which produces this icon'sImage
.void
paintIcon(Component c, Graphics g, int x, int y)
void
setImage(Image img)
This method does nothing.void
setOp(ImageOp op)
Sets theImageOp
which 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 anOpIcon
using a givenImageOp
as its image source.- Parameters:
op
- theImageOp
to be used by thisOpIcon
-
-
Method Details
-
paintIcon
The given
ImageOp
is 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:
getIconWidth
in interfaceIcon
- Overrides:
getIconWidth
in classImageIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeight
in interfaceIcon
- Overrides:
getIconHeight
in classImageIcon
-
getOp
Returns theImageOp
which produces this icon'sImage
.- Returns:
- the
ImageOp
for thisOpIcon
-
setOp
Sets theImageOp
which produces this icon'sImage
.- Parameters:
op
- theImageOp
-