org.proteinshader.gui.listeners.controlpanel
Class ScalePanelListenerFactory

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

public class ScalePanelListenerFactory
extends Object

Creates the listeners for the AtomScalePanel.


Constructor Summary
ScalePanelListenerFactory(Mediator mediator, AtomScalePanel scalePanel)
          Constructs a ScalePanelListenerFactory.
 
Method Summary
 ActionListener createApplyButtonActionListener()
          Creates an action listener for the 'Apply' button.
 ActionListener createDefaultButtonActionListener()
          Creates an action listener for the 'Default' button.
 ChangeListener createSpinnerChangeListener()
          Creates an change listener for a spinner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScalePanelListenerFactory

public ScalePanelListenerFactory(Mediator mediator,
                                 AtomScalePanel scalePanel)
Constructs a ScalePanelListenerFactory.

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

createSpinnerChangeListener

public ChangeListener createSpinnerChangeListener()
Creates an change listener for a spinner. This change listener has the same effect as the 'Apply' button action listener.

Returns:
The action listener.

createApplyButtonActionListener

public ActionListener createApplyButtonActionListener()
Creates an action listener for the 'Apply' button.

Returns:
The action listener.

createDefaultButtonActionListener

public ActionListener createDefaultButtonActionListener()
Creates an action listener for the 'Default' button. The listener calls on the applyDefaultScale() method of the ScalePanel before redrawing the canvas.

Returns:
The action listener.


Copyright © 2007-2008