de.javagl.swogl
Interface SwoglComponentHandler

All Known Subinterfaces:
SwoglRenderer

public interface SwoglComponentHandler

Interface for all classes that may handle SwoglComponents. Instances of classes implementing this interface may be passed to the SwoglContainer.create(java.awt.Component, SwoglComponentHandler, PickingRayComputer) method, and will be responsible for maintaining the rendered representation of SwoglComponents: The SwoglComponents may be added to or removed from the SwoglContainer, which will cause the handleSwoglComponent(SwoglComponent) and releaseSwoglComponent(SwoglComponent) methods to be called, respectively. The handler is responsible for maintaining the internal rendering data structures associated with the respective SwoglComponent.


Method Summary
 void handleSwoglComponent(SwoglComponent swoglComponent)
          Handle the given SwoglComponent.
 void releaseSwoglComponent(SwoglComponent swoglComponent)
          Release the given SwoglComponent.
 

Method Detail

handleSwoglComponent

void handleSwoglComponent(SwoglComponent swoglComponent)
Handle the given SwoglComponent. This method will be called by the SwoglContainer, when a new SwoglComponent is added. This may eventually cause internal data structures for the SwoglComponent to be built, so that the SwoglComponent may be rendered. The method may be called from any thread. The implementor is responsible for making this method thread-safe.

Parameters:
swoglComponent - The SwoglComponent to handle

releaseSwoglComponent

void releaseSwoglComponent(SwoglComponent swoglComponent)
Release the given SwoglComponent. This method will be called by the SwoglContainer, when a new SwoglComponent is removed. This may eventually cause internal data structured for the SwoglComponent to be cleaned up. The method may be called from any thread. The implementor is responsible for making this method thread-safe.

Parameters:
swoglComponent - The SwoglComponent to release