|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xj.anylogic.engine.presentation.SnapshotEventListener
public class SnapshotEventListener
Listener of snapshot events, it is notified about changes performed by
Presentation.saveSnapshot(String) and
Presentation.loadSnapshot(String) methods
Listener is not notified about operations performed using save/restore
snapshot buttons on the toolbar as well as on automatic root object loads in
the corresponding experiments
| Constructor Summary | |
|---|---|
SnapshotEventListener()
Creates new listener which will be notified on each snapshot operation, until it is manually removed from presentation using Presentation.removeSnapshotEventListener(SnapshotEventListener)
method |
|
SnapshotEventListener(boolean actOnlyOnce)
Creates new listener |
|
| Method Summary | |
|---|---|
void |
errorOccured(java.lang.String snapshotFileName,
java.lang.Throwable e)
This callback is invoked when snapshot save/load operation was unsuccessful Default implementation does nothing |
void |
snapshotLoaded(java.lang.String snapshotFileName)
This callback is invoked when snapshot is successfully loaded Default implementation does nothing |
void |
snapshotSaved(java.lang.String snapshotFileName)
This callback is invoked when snapshot is successfully saved Default implementation does nothing |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SnapshotEventListener()
Presentation.removeSnapshotEventListener(SnapshotEventListener)
method
public SnapshotEventListener(boolean actOnlyOnce)
actOnlyOnce - true, this listener will be
automatically removed from Presentation after the next
single operation (load or save snapshot) completes (or fails).
Use true if listener is designed to act only
oncefalse, this listener will be notified
on each snapshot operation, until it is manually removed from
presentation using
Presentation.removeSnapshotEventListener(SnapshotEventListener)
method
| Method Detail |
|---|
public void snapshotLoaded(java.lang.String snapshotFileName)
snapshotFileName - the name of loaded snapshot filepublic void snapshotSaved(java.lang.String snapshotFileName)
snapshotFileName - the name of saved snapshot file
public void errorOccured(java.lang.String snapshotFileName,
java.lang.Throwable e)
snapshotFileName - the name of snapshot filee - the exception/error which was the reason of snapshot operation
termination
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||