org.proteinshader.gui.listeners.controlpanel
Class AntialiasingPanelListenerFactory

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

public class AntialiasingPanelListenerFactory
extends Object

Creates the listeners for the AntialiasingPanel.


Constructor Summary
AntialiasingPanelListenerFactory(Mediator mediator, AntialiasingPanel antialiasingPanel)
          Constructs a AntialiasingPanelListenerFactory.
 
Method Summary
 ItemListener createHalftoningCheckBoxListener()
          Creates a change listener for the 'Antialias halftoning images' check box.
 ActionListener createJitterMenuActionListener()
          Creates a listener for the Jitter menu.
 ItemListener createSceneCheckBoxListener()
          Creates a change listener for the 'Antialias entire scene' check box.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntialiasingPanelListenerFactory

public AntialiasingPanelListenerFactory(Mediator mediator,
                                        AntialiasingPanel antialiasingPanel)
Constructs a AntialiasingPanelListenerFactory.

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

createSceneCheckBoxListener

public ItemListener createSceneCheckBoxListener()
Creates a change listener for the 'Antialias entire scene' check box.

The listener calls on the antialiasScene(boolean) method of the AntialiasingPanel, which, if the checkbox is selected, will use the current value of the jitter menu to call antialiasScene(jitter) method of the Mediator. If the check box is deselected, the antialiasScene(boolean) method of the AntialiasingPanel is called with an argument of false, so the antialiasingScene(jitter) method of the Mediator will be called with an argument of null.

Returns:
The item listener.

createHalftoningCheckBoxListener

public ItemListener createHalftoningCheckBoxListener()
Creates a change listener for the 'Antialias halftoning images' check box.

The listener calls on the blendObjectEdges(boolean) method of the Mediator.

Returns:
The item listener.

createJitterMenuActionListener

public ActionListener createJitterMenuActionListener()
Creates a listener for the Jitter menu.

The listener calls on the antialiasScene(jitter) method of the AntialiasingPanel, which will only apply the jitter if the 'Antialias entire scene' check box is currently selected.

Returns:
The action listener.


Copyright © 2007-2008