bin
Class GUIFramework.CheckBoxListener

java.lang.Object
  extended by bin.GUIFramework.CheckBoxListener
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
GUIFramework

protected class GUIFramework.CheckBoxListener
extends java.lang.Object
implements java.awt.event.ActionListener

Ever wonder what happens when you click on a checkbox - well it's all contained here...


Constructor Summary
protected GUIFramework.CheckBoxListener()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Invoked when an action occurs.
 void calculateFeaturesAvailable(int value)
          This method is where the bulk of the processing "power" lies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GUIFramework.CheckBoxListener

protected GUIFramework.CheckBoxListener()
Method Detail

calculateFeaturesAvailable

public void calculateFeaturesAvailable(int value)
This method is where the bulk of the processing "power" lies. When passed a powered numerical "value", eg:
Math.pow (x, y)
(where the "value" returned is the value of the first argument, raised to the power of the second argument)

... it caculates what features (tabs) should be made accessible corresponding to the user's choice(s).

Once these features have been calculated, it will also de-select any of the other "Use This Instinct?" checkboxes (that refer to previous decisions) but still retain the values. This way, inputted data is not deleted - simply provide a valid "Special Character AI" trait and the checkbox may be selected again, and the original (supplied) values (re-)used.

Parameters:
value - The combined value of features selected to use as a base for calculating which tabs/checkboxes should be enabled/selected.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Invoked when an action occurs.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
event - The event responsible for the action.