Package com.scriptel.proscript
Class ResourceGraphic
- java.lang.Object
-
- com.scriptel.proscript.Resource
-
- com.scriptel.proscript.ResourceGraphic
-
public class ResourceGraphic extends Resource
This class represents a graphic resource that is storable on the device.
-
-
Constructor Summary
Constructors Constructor Description ResourceGraphic()
Public constructorResourceGraphic(int resourceNumber, java.awt.image.BufferedImage graphic)
Public constructor to allow users to create their own resources.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getData()
This gets the graphic in byte data.java.awt.image.BufferedImage
getGraphic()
Gets the graphic data as a BufferedImage.void
setData(byte[] data)
This sets the graphic using byte data.void
setGraphic(java.awt.image.BufferedImage graphic)
Sets the graphic data using a BufferedImagejava.lang.String
toString()
Prints this object as a human readable string.-
Methods inherited from class com.scriptel.proscript.Resource
getResourceNumber, setResourceNumber
-
-
-
-
Constructor Detail
-
ResourceGraphic
public ResourceGraphic()
Public constructor
-
ResourceGraphic
public ResourceGraphic(int resourceNumber, java.awt.image.BufferedImage graphic)
Public constructor to allow users to create their own resources.- Parameters:
resourceNumber
- the resource id this graphic will be stored ingraphic
- the graphic data as a BufferedImage
-
-
Method Detail
-
toString
public java.lang.String toString()
Prints this object as a human readable string.
-
getGraphic
public java.awt.image.BufferedImage getGraphic()
Gets the graphic data as a BufferedImage.- Returns:
- graphic data
-
setGraphic
public void setGraphic(java.awt.image.BufferedImage graphic)
Sets the graphic data using a BufferedImage- Parameters:
graphic
- graphic
-
getData
public byte[] getData()
This gets the graphic in byte data.- Returns:
- data
-
setData
public void setData(byte[] data)
This sets the graphic using byte data.- Parameters:
data
- data
-
-