edu.buffalo.fs7.mathlib
Class MathlibEvent

java.lang.Object
  |
  +--edu.buffalo.fs7.mathlib.MathlibEvent

public class MathlibEvent
extends java.lang.Object

A MathlibEvent is fired whenever a variable is created, deleted or changes it's value. With this mechanism all listeners are notified about a change in the Mathlib scope. The event is usually fired by the Parse class, but exceptionally as well in the jaQuzzi program.

See Also:
MathlibEventListener

Field Summary
static int ADD
          variable added
static int CHANGE
          variable value change
static int CHANGE_CATEGORY
          variable category change
static int CHANGE_NAME
          variable name change
static int REMOVE
          variable removed
 
Constructor Summary
MathlibEvent(java.lang.Object source, java.lang.String objectName, java.lang.String newName, java.lang.String category, MathObject mathObject, int action)
          creates a MathlibEvent
MathlibEvent(java.lang.String objectName, MathObject mathObject, int action)
          creates a MathlibEvent
MathlibEvent(java.lang.String oldName, java.lang.String newName)
          creates a rename MathlibEvent
MathlibEvent(java.lang.String objectName, java.lang.String newName, java.lang.String category, MathObject mathObject, int action)
          creates a MathlibEvent
 
Method Summary
 int getAction()
          returns the action code of the mathlib event
 java.lang.String getCategory()
          returns the category of the MathObject
 MathObject getMathObject()
          returns the value of the affected MathObject
 java.lang.String getNewName()
          return the newName argument
 java.lang.String getObjectName()
          returns the name of the affected MathObject
 java.lang.Object getSource()
          returns the origin of the MathlibEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADD

public static int ADD
variable added

REMOVE

public static int REMOVE
variable removed

CHANGE

public static int CHANGE
variable value change

CHANGE_NAME

public static int CHANGE_NAME
variable name change

CHANGE_CATEGORY

public static int CHANGE_CATEGORY
variable category change
Constructor Detail

MathlibEvent

public MathlibEvent(java.lang.Object source,
                    java.lang.String objectName,
                    java.lang.String newName,
                    java.lang.String category,
                    MathObject mathObject,
                    int action)
creates a MathlibEvent
Parameters:
source - the source object causing the event
objectName - the name of the affected MathObject
newName - a possible new name for the MathObject
category - the category of the mathObject
mathObject - the value of the MathObject
action - the action code

MathlibEvent

public MathlibEvent(java.lang.String objectName,
                    java.lang.String newName,
                    java.lang.String category,
                    MathObject mathObject,
                    int action)
creates a MathlibEvent
Parameters:
objectName - the name of the affected MathObject
newName - a possible new name for the MathObject
category - the category of the mathObject
mathObject - the value of the MathObject
action - the action code

MathlibEvent

public MathlibEvent(java.lang.String objectName,
                    MathObject mathObject,
                    int action)
creates a MathlibEvent
Parameters:
objectName - the name of the affected MathObject
mathObject - the value of the MathObject
action - the action code

MathlibEvent

public MathlibEvent(java.lang.String oldName,
                    java.lang.String newName)
creates a rename MathlibEvent
Parameters:
objectName - the name of the affected MathObject
newName - a possible new name for the MathObject
Method Detail

getSource

public java.lang.Object getSource()
returns the origin of the MathlibEvent

getAction

public int getAction()
returns the action code of the mathlib event

getNewName

public java.lang.String getNewName()
return the newName argument

getObjectName

public java.lang.String getObjectName()
returns the name of the affected MathObject

getMathObject

public MathObject getMathObject()
returns the value of the affected MathObject

getCategory

public java.lang.String getCategory()
returns the category of the MathObject