XFigure figure = overlayFigures [i];
if (figure.getClass().isAssignableFrom(presentationClass))
{
// Yes, we do. Adjust the overlay figure position and orientation accordingly and return it
figure.displayBox(presentationFigure.displayBox());
if (presentationFigure instanceof XFigure)
{
figure.setOrientation(((XFigure) presentationFigure).getOrientation());
}