Package adams.event
Class VariableChangeEvent
- java.lang.Object
-
- java.util.EventObject
-
- adams.event.VariableChangeEvent
-
- All Implemented Interfaces:
Serializable
public class VariableChangeEvent extends EventObject
Gets sent whenever variables get modified.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VariableChangeEvent.Type
The type of event.
-
Field Summary
Fields Modifier and Type Field Description protected String
m_Name
the name of the variable.protected VariableChangeEvent.Type
m_Type
the type of the event.-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description VariableChangeEvent(Variables source, VariableChangeEvent.Type type, String name)
Initializes the event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Returns the name of the variable of this event.VariableChangeEvent.Type
getType()
Returns the type of the event.Variables
getVariables()
Returns the variables that triggered the event.String
toString()
Returns a string representation of the event.-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Field Detail
-
m_Type
protected VariableChangeEvent.Type m_Type
the type of the event.
-
m_Name
protected String m_Name
the name of the variable.
-
-
Constructor Detail
-
VariableChangeEvent
public VariableChangeEvent(Variables source, VariableChangeEvent.Type type, String name)
Initializes the event.- Parameters:
source
- the Variables object that triggered the eventtype
- the type of eventname
- the name of the variable
-
-
Method Detail
-
getVariables
public Variables getVariables()
Returns the variables that triggered the event.- Returns:
- the source
-
getType
public VariableChangeEvent.Type getType()
Returns the type of the event.- Returns:
- the type
-
getName
public String getName()
Returns the name of the variable of this event.- Returns:
- the name
-
toString
public String toString()
Returns a string representation of the event.- Overrides:
toString
in classEventObject
- Returns:
- the string representation
-
-