de.javagl.swogl.layout
Class WheelLayout3D

java.lang.Object
  extended by de.javagl.swogl.layout.WheelLayout3D
All Implemented Interfaces:
LayoutManager3D

public class WheelLayout3D
extends java.lang.Object
implements LayoutManager3D

An implementation of the LayoutManager3D interface that arranges the components as a wheel. The wheel of components may then be rotated with the mouse wheel.


Constructor Summary
WheelLayout3D()
          Creates a new WheelLayout3D
 
Method Summary
 void doLayout3D()
          Lays out the SwoglComponents in a SwoglContainer
 void rotateWheel(int steps)
          Rotate the wheel about the given number of steps
 void setStepDuration(int ms)
          Set the duration of a single step of the wheel rotation in milliseconds (this is the time for the transition between two components)
 void setSwoglContainer(SwoglContainer swoglContainer)
          This method will assign the given SwoglContainer to this LayoutManager3D.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WheelLayout3D

public WheelLayout3D()
Creates a new WheelLayout3D

Method Detail

setStepDuration

public void setStepDuration(int ms)
Set the duration of a single step of the wheel rotation in milliseconds (this is the time for the transition between two components)

Parameters:
ms - The duration in milliseconds

setSwoglContainer

public void setSwoglContainer(SwoglContainer swoglContainer)
Description copied from interface: LayoutManager3D
This method will assign the given SwoglContainer to this LayoutManager3D. When this LayoutManager3D is assigned to a SwoglContainer using the SwoglContainer.setLayout3D(LayoutManager3D) method, the SwoglContainer will pass itself to this method. When a different LayoutManager3D is assigned to the SwoglContainer, then the SwoglContainer will call this method and pass 'null' as the argument. This allows implementations of this interface to perform an initialization when this LayoutManager3D becomes assigned to a SwoglContainer, and necessary cleanup operations when they are detached from a SwoglContainer.

Specified by:
setSwoglContainer in interface LayoutManager3D
Parameters:
swoglContainer - The SwoglContainer for this LayoutManager3D

doLayout3D

public void doLayout3D()
Description copied from interface: LayoutManager3D
Lays out the SwoglComponents in a SwoglContainer

Specified by:
doLayout3D in interface LayoutManager3D

rotateWheel

public void rotateWheel(int steps)
Rotate the wheel about the given number of steps

Parameters:
steps - The number of steps to rotate