de.erichseifert.gral.data
Class DataChangeEvent
- java.lang.Object
-
- java.util.EventObject
-
- de.erichseifert.gral.data.DataChangeEvent
-
- All Implemented Interfaces:
- java.io.Serializable
public class DataChangeEvent extends java.util.EventObjectClass that stores information on a change of a specific data value in a data source.- See Also:
DataListener,DataSource, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DataChangeEvent(DataSource source, int col, int row, java.lang.Comparable<T> valOld, java.lang.Comparable<T> valNew)Initializes a new event with data source, position of the data value, and the values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetCol()Returns the column index of the value that was changed.java.lang.Comparable<?>getNew()Returns the new value after the change has been applied.java.lang.Comparable<?>getOld()Returns the old value before it has changed.intgetRow()Returns the row index of the value that was changed.
-
-
-
Constructor Detail
-
DataChangeEvent
public DataChangeEvent(DataSource source, int col, int row, java.lang.Comparable<T> valOld, java.lang.Comparable<T> valNew)
Initializes a new event with data source, position of the data value, and the values.- Type Parameters:
T- Data type of the cell that has changed.- Parameters:
source- Data source.col- Columns of the value.row- Row of the value.valOld- Old value.valNew- New value.
-
-
Method Detail
-
getCol
public int getCol()
Returns the column index of the value that was changed.- Returns:
- Column index of the changed value.
-
getRow
public int getRow()
Returns the row index of the value that was changed.- Returns:
- Row index of the changed value.
-
getOld
public java.lang.Comparable<?> getOld()
Returns the old value before it has changed.- Returns:
- Value before the change.
-
getNew
public java.lang.Comparable<?> getNew()
Returns the new value after the change has been applied.- Returns:
- Value after the change.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG