gui
Class PreferencesBox

java.lang.Object
  extended bycore.EventNotifier
      extended bygui.PreferencesBox
All Implemented Interfaces:
java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.util.EventListener

public class PreferencesBox
extends EventNotifier
implements java.awt.event.ActionListener, javax.swing.event.ChangeListener

This is called when you click on the preferences menu item. Allows you to set min and max number of neighbors, cache max size, sounds on/off.

Author:
schmitth

Constructor Summary
PreferencesBox(Prefs prefs)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void doChanges()
          Checks if there were any changes to the values, and if so, sets them to the new value.
 void setVisible(boolean isVisible)
          Makes the prefBox visible or invisible.
 void stateChanged(javax.swing.event.ChangeEvent e)
           
 void undoChanges()
          Checks if there were any changes to the spinners and checkboxes, and if so, sets them back.
 
Methods inherited from class core.EventNotifier
addListener, removeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreferencesBox

public PreferencesBox(Prefs prefs)
Method Detail

setVisible

public void setVisible(boolean isVisible)
Makes the prefBox visible or invisible.

Parameters:
isVisible -

doChanges

public void doChanges()
Checks if there were any changes to the values, and if so, sets them to the new value.


undoChanges

public void undoChanges()
Checks if there were any changes to the spinners and checkboxes, and if so, sets them back.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener