java.lang.Object
fr.r1r0r0.deltaengine.model.sprites.Image
All Implemented Interfaces:
Sprite

public final class Image
extends java.lang.Object
implements Sprite
Image Sprite to display image
  • Field Summary

    Fields
    Modifier and Type Field Description
    private javafx.scene.image.ImageView imageView  
    private java.lang.String path  
  • Constructor Summary

    Constructors
    Constructor Description
    Image​(java.lang.String path)
    Instantiate an Image Sprite with an image
  • Method Summary

    Modifier and Type Method Description
    javafx.scene.Node getNode()
    The Sprite object
    java.lang.String getPath()
    Path to image file
    void resize​(double width, double height)
    resize the sprite to the following width and height

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface fr.r1r0r0.deltaengine.model.sprites.Sprite

    getLayout, getRotate, getScale, getSize, getZOrder, setLayout, setLayout, setRotate, setScale, setZOrder
  • Field Details

    • path

      private java.lang.String path
    • imageView

      private javafx.scene.image.ImageView imageView
  • Constructor Details

    • Image

      public Image​(java.lang.String path) throws java.io.FileNotFoundException
      Instantiate an Image Sprite with an image
      Parameters:
      path - to the image file
      Throws:
      java.io.FileNotFoundException
  • Method Details

    • getNode

      public javafx.scene.Node getNode()
      Description copied from interface: Sprite
      The Sprite object
      Specified by:
      getNode in interface Sprite
      Returns:
      the Sprite object
    • resize

      public void resize​(double width, double height)
      Description copied from interface: Sprite
      resize the sprite to the following width and height
      Specified by:
      resize in interface Sprite
    • getPath

      public java.lang.String getPath()
      Path to image file
      Returns:
      String path to file