public class Image extends NetPuzlObject
Modifier and Type | Field and Description |
---|---|
private java.awt.image.BufferedImage |
img
This is a buffered image representation of a NetPuzl Image object.
|
Constructor and Description |
---|
Image(ObjID objID,
Attributes attributes,
java.util.Map<ObjID,NetPuzlObject> cache)
Constructs an Image with the given parameters
|
Modifier and Type | Method and Description |
---|---|
TSet |
createSetTag()
Overrides createSetTag because our Images do not use names, text, energy,
background colors, foreground colors, or Images
|
java.awt.image.BufferedImage |
getImage()
This is a getter method for this Image object will return a BufferedImage
representation of this Image object.
|
void |
loadImage(java.lang.String loc)
This method is used to load an image from a specified file location in
the package.
|
void |
setImage(java.awt.image.BufferedImage image)
Sets the BufferedImage representation of this Image
|
fullToString, getAttributes, getObjID, setAttributes, toString
private java.awt.image.BufferedImage img
public Image(ObjID objID, Attributes attributes, java.util.Map<ObjID,NetPuzlObject> cache)
objID
- The object ID to construct this NetPuzl Image withattributes
- The attributes to construct this NetPuzl Image withcache
- The Map to cache this NetPuzl Image inpublic TSet createSetTag()
createSetTag
in class NetPuzlObject
NetPuzlObject.createSetTag()
public java.awt.image.BufferedImage getImage()
public void loadImage(java.lang.String loc) throws java.io.IOException
loc
- The path to the image.java.io.IOException
- If the path is nothing or spelled wrong or what have
you.public void setImage(java.awt.image.BufferedImage image)
image
- The BufferedImage to set this Image to