jme.geometry.hud
Class SplashScreen

java.lang.Object
  extended byjme.geometry.hud.SplashScreen

public class SplashScreen
extends java.lang.Object

SplashScreen creates a screen encompassing splash screen to be displayed. This is typically used for title screens, and company logos. The class contains a holdDisplay method to allow the screen to be displayed for a set amount of time.

Version:
$Id: SplashScreen.java,v 1.2 2003/09/03 16:20:51 mojomonkey Exp $
Author:
Mark Powell

Constructor Summary
SplashScreen()
          Constructor instantiates a new SplashScreen object.
 
Method Summary
 void holdDisplay()
          holdDisplay will display the splash screen for the desired amount of time define by setDelay.
 void render()
          render display the splash screen to the display view.
 void setBlended(boolean value)
          setBlended turns blending (using the alpha value of the color) on and off.
 void setColor(float red, float green, float blue, float alpha)
          setColor sets the color to shade the splashscreen.
 void setDelay(long delay)
          setDelay sets how long to display the splash screen in milliseconds.
 void setPosition(float x, float y)
          setPosition sets the bottom left corner of the splash screen display.
 void setSize(float height, float width)
          setSize sets the size of the splash.
 void setTexture(java.lang.String filename)
          setTexture sets the image to display as the splash.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplashScreen

public SplashScreen()
Constructor instantiates a new SplashScreen object.

Throws:
MonkeyGLException - if this class is used before initializing the OpenGL context.
Method Detail

setTexture

public void setTexture(java.lang.String filename)
setTexture sets the image to display as the splash.

Parameters:
filename - the image for the splash screen.

setColor

public void setColor(float red,
                     float green,
                     float blue,
                     float alpha)
setColor sets the color to shade the splashscreen.

Parameters:
red - the red component of the color.
green - the green component of the color.
blue - the blue component of the color.
alpha - the alpha component of the color.

setPosition

public void setPosition(float x,
                        float y)
setPosition sets the bottom left corner of the splash screen display. Default is (0,0).

Parameters:
x - the x coordinate of the bottom left corner.
y - the y coordinate of the bottom left corner.

setSize

public void setSize(float height,
                    float width)
setSize sets the size of the splash. This will "grow" from the position of the bottom left corner which can be set via setPosition.

Parameters:
height - the height of the splash.
width - the width of the splash.
Throws:
MonkeyRuntimeException - if height or width is negative.

setBlended

public void setBlended(boolean value)
setBlended turns blending (using the alpha value of the color) on and off.

Parameters:
value - true if blending is on, false otherwise.

setDelay

public void setDelay(long delay)
setDelay sets how long to display the splash screen in milliseconds.

Parameters:
delay - the amount of time to display the screen (in milliseconds).

holdDisplay

public void holdDisplay()
holdDisplay will display the splash screen for the desired amount of time define by setDelay.


render

public void render()
render display the splash screen to the display view.