File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
src/main/java/org/scijava/io/event Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 3838 */
3939public class DataOpenedEvent extends IOEvent {
4040
41- public DataOpenedEvent (final String source ) {
42- super (source );
41+ public DataOpenedEvent (final String source , final Object data ) {
42+ super (source , data );
4343 }
4444
4545 // -- DataOpenedEvent methods --
Original file line number Diff line number Diff line change 3838 */
3939public class DataSavedEvent extends IOEvent {
4040
41- public DataSavedEvent (final String destination ) {
42- super (destination );
41+ public DataSavedEvent (final String destination , final Object data ) {
42+ super (destination , data );
4343 }
4444
4545 // -- DataSavedEvent methods --
Original file line number Diff line number Diff line change @@ -43,20 +43,29 @@ public abstract class IOEvent extends SciJavaEvent {
4343 /** The data descriptor (source or destination). */
4444 private final String descriptor ;
4545
46- public IOEvent (final String descriptor ) {
46+ /** The data for which I/O took place. */
47+ private final Object data ;
48+
49+ public IOEvent (final String descriptor , final Object data ) {
4750 this .descriptor = descriptor ;
51+ this .data = data ;
4852 }
4953
5054 /** Gets the data descriptor (source or destination). */
5155 public String getDescriptor () {
5256 return descriptor ;
5357 }
5458
59+ /** Gets the data for which I/O took place. */
60+ public Object getData () {
61+ return data ;
62+ }
63+
5564 // -- Object methods --
5665
5766 @ Override
5867 public String toString () {
59- return super .toString () + "\n \t descriptor = " + descriptor ;
68+ return super .toString () + "\n \t descriptor = " + data + " \n \t data = " + data ;
6069 }
6170
6271}
You can’t perform that action at this time.
0 commit comments