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 constructor
    `ResourceGraphic​(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 BufferedImage
    `java.lang.String` | `toString()` | Prints this object as a human readable string.

    - ### Methods inherited from class com.scriptel.proscript.Resource

      `getResourceNumber, setResourceNumber`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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 in
        `graphic` - the graphic data as a BufferedImage

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Prints this object as a human readable string.
      Overrides:
        `toString` in class `Resource`
      Returns:
        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