Scene Beans

SceneBeans ( is a Java framework for building composable, animated graphics. The design uses many of the GangOfFour DesignPatterns and JavaIdioms. Patterns of graphics programming discovered during development of the framework are being added to the GraphicsPatterns page.



The graphics drawn by SceneBeans are defined by a SceneGraph, a directed, acyclic graph of JavaBeans. Each bean encapsulates a simple drawing command and are combined to describe complex scenes. The SceneBeans framework includes components to display scene graphs. Programmers can concentrate on building scene graphs to render the required display, rather than writing code to paint the display in response to expose events.


A program animates a scene graph by modifying properties of the beans in the graph before drawing each frame. The SceneBeans framework provides support for scheduling animation behaviours. The programmer merely has to select the behaviour components they require and wire them into the scene graph. SceneBeans is the only framework that the author knows of that can animate constructive area geometry.

XML File Format

SceneBeans uses an XML-based file format to define animations. This allows non-programmers to build animations without programming a single line of Java and and also is convenient for programmers because they can avoid the frustrating edit/compile/debug cycle when fine-tuning animation parameters.


The SceneBeans framework is designed to allow applications to communicate with and control animations so that animations can communicate application-specific information to the user, rather than being mere "eye candy".


The XML parser provides methods to register additional packages of application-specific beans. The <?scenebeans...?> processing instruction allows individual animations to register additional packages of beans stored in separate JAR files. The beans are then loaded as ParameterClasses.

ConcurrencyStateModelsAndJavaPrograms uses SceneBeans to animate models of concurrent programs.

EditText of this page (last edited November 15, 2009) or FindPage with title or text search