org.proteinshader.gui.listeners.controlpanel
Class MotionPanelListenerFactory

java.lang.Object
  extended by org.proteinshader.gui.listeners.controlpanel.MotionPanelListenerFactory

public class MotionPanelListenerFactory
extends Object

Creates the listeners for the MotionPanel.


Constructor Summary
MotionPanelListenerFactory(Mediator mediator, MotionPanel motionPanel)
          Constructs a MotionPanelListenerFactory.
 
Method Summary
 ActionListener createStartButtonActionListener()
          Creates an action listener for the 'Start' button.
 ActionListener createStopButtonActionListener()
          Creates an action listener for the 'Stop' button.
 ActionListener createTextFieldActionListener()
          Creates an action listener for the 'X-Axis' text field.
 ChangeListener createXAxisSliderChangeListener()
          Creates a change listener for the 'X-Axis' slider that is used to adjust the rotation speed.
 ChangeListener createYAxisSliderChangeListener()
          Creates a change listener for the 'Y-Axis' slider that is used to adjust the rotation speed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MotionPanelListenerFactory

public MotionPanelListenerFactory(Mediator mediator,
                                  MotionPanel motionPanel)
Constructs a MotionPanelListenerFactory.

Parameters:
mediator - the centralized Mediator object that listeners call on to accomplish their task.
motionPanel - the MotionPanel that this class creates listeners for.
Method Detail

createStartButtonActionListener

public ActionListener createStartButtonActionListener()
Creates an action listener for the 'Start' button.

Returns:
The action listener.

createStopButtonActionListener

public ActionListener createStopButtonActionListener()
Creates an action listener for the 'Stop' button.

Returns:
The action listener.

createTextFieldActionListener

public ActionListener createTextFieldActionListener()
Creates an action listener for the 'X-Axis' text field.

Returns:
The action listener.

createXAxisSliderChangeListener

public ChangeListener createXAxisSliderChangeListener()
Creates a change listener for the 'X-Axis' slider that is used to adjust the rotation speed. The MotionPanel will be told to update the 'X-Axis' text field below the slider, and, if an animation is in progress, the new speed will also be forwarded to the Mediator.

Returns:
The change listener.

createYAxisSliderChangeListener

public ChangeListener createYAxisSliderChangeListener()
Creates a change listener for the 'Y-Axis' slider that is used to adjust the rotation speed. The MotionPanel will be told to update the 'Y-Axis' text field below the slider, and, if an animation is in progress, the new speed will also be forwarded to the Mediator.

Returns:
The change listener.


Copyright © 2007-2008