Java Lab Documentation

Theater

Category:org.code.theater

Method Details

play

public static void play(Scene[] scene)

Plays a 1D array of Scene objects, generating an animation and presenting it in Java Lab. There can be only one call to play() or playScenes() per execution of a program.

Parameters

NameTypeRequired?Description
sceneScene[]

the Scene object to play

Examples

Scene[] myScenes = {firstScene, secondScene};
Theater.play(myScenes);

playScenes

public static void playScenes(Scene scene)

Plays the Scene object provided, generating an animation and displaying it in Java Lab. There can be only one call to play() or playScenes() per execution of a program.

Parameters

NameTypeRequired?Description
scenesScene

a Scene object to play

Examples

Scene myScene = new Scene();
Theater.playScenes(myScene);
Overloads

playScenes

public static void playScenes(Scene... scenes)

Plays all Scene objects provided as parameters to this call. This method uses a special feature of Java that allows for any number of Scene objects to be passed to the method without requiring an array to be created. There can be only one call to play() or playScenes() per execution of a program.

Parameters

NameTypeRequired?Description
scenesScene

one or more Scene objects to be played for the animation

Examples

Theater.playScenes(myFirstScene, mySecondScene, myThirdScene);