TrustGrapher
r52
A playabale simulator for modelling trust between agents
|
Plays through the list of TrustLogEvents. After each tick, the events that occured between the ticks are sent to the event handlers of all the GraphPairs.
Definition at line 23 of file EventPlayer.java.
cu.trustGrapher.eventplayer.EventPlayer.EventPlayer | ( | TrustGrapher | trustGrapher, |
List< TrustLogEvent > | events | ||
) |
void cu.trustGrapher.eventplayer.EventPlayer.actionPerformed | ( | ActionEvent | event | ) |
Called by the timer after every tick. Calls goToEvent with the new eventIndex to go to depending on the playState and the eventsPerTick.
event | The ActionEvent |
Definition at line 209 of file EventPlayer.java.
void cu.trustGrapher.eventplayer.EventPlayer.addEventPlayerListener | ( | EventPlayerListener | listener | ) |
Adds an EventPlayerListener to the EventPlayer. This will have the EventPlayer notify the listeners of timeline changes.
listener |
Definition at line 135 of file EventPlayer.java.
boolean cu.trustGrapher.eventplayer.EventPlayer.atAnEnd | ( | ) |
Definition at line 95 of file EventPlayer.java.
boolean cu.trustGrapher.eventplayer.EventPlayer.atBack | ( | ) |
Definition at line 87 of file EventPlayer.java.
boolean cu.trustGrapher.eventplayer.EventPlayer.atFront | ( | ) |
Definition at line 80 of file EventPlayer.java.
void cu.trustGrapher.eventplayer.EventPlayer.forward | ( | ) |
Sets the EventPlayer to play backward. Never modify the playState directly. Always use this.
Definition at line 172 of file EventPlayer.java.
int cu.trustGrapher.eventplayer.EventPlayer.getCurrentEventIndex | ( | ) |
Definition at line 73 of file EventPlayer.java.
List<TrustLogEvent> cu.trustGrapher.eventplayer.EventPlayer.getEvents | ( | ) |
LogPanel cu.trustGrapher.eventplayer.EventPlayer.getLogPanel | ( | ) |
Searches through the list of listeners and returns the first one that is an instance of a LogPanel. If the logPanel can not be found, an error message is shown, as this should never happen.
Definition at line 119 of file EventPlayer.java.
PlaybackPanel cu.trustGrapher.eventplayer.EventPlayer.getPlaybackPanel | ( | ) |
Searches through the list of listeners and returns the first one that is an instance of a playbackPanel. If the playbackPanel can not be found, an error message is shown, as this should never happen.
Definition at line 104 of file EventPlayer.java.
int cu.trustGrapher.eventplayer.EventPlayer.getPlayState | ( | ) |
Returns the current playstate of the EventPlayer in an integer form. Refer to the static ints for their names.
Definition at line 66 of file EventPlayer.java.
TrustGrapher cu.trustGrapher.eventplayer.EventPlayer.getTrustGrapher | ( | ) |
void cu.trustGrapher.eventplayer.EventPlayer.goToEvent | ( | int | newEventIndex | ) |
The EventPlayer processes the events between the currentEventIndex and the new one, then updates the GraphViewers. If the newEventIndex is out of the bounds of the event list, it is brought into the bounds. If the newEventIndex is an end of the event list, playback is paused.
newEventIndex | The index of the event to go to |
Definition at line 221 of file EventPlayer.java.
void cu.trustGrapher.eventplayer.EventPlayer.insertEvent | ( | TrustLogEvent | event | ) |
Rewinds to the start of the simulation, then calls startGraph() with the new event list that has had the new event added to restart the simulation.
event | The new event to add |
Definition at line 265 of file EventPlayer.java.
void cu.trustGrapher.eventplayer.EventPlayer.modifyEvent | ( | TrustLogEvent | event | ) |
Rewinds to the start of the simulation, then calls startGraph() with the new event list that has had the event at the previous index modified to restart the simulation.
event |
Definition at line 299 of file EventPlayer.java.
synchronized void cu.trustGrapher.eventplayer.EventPlayer.pause | ( | ) |
Sets the EventPlayer to pause. Never modify the playState directly. Always use this.
Definition at line 195 of file EventPlayer.java.
void cu.trustGrapher.eventplayer.EventPlayer.removeEvent | ( | ) |
Rewinds to the start of the simulation, then calls startGraph() with the new event list that has had the event at the previous index removed to restart the simulation.
Definition at line 282 of file EventPlayer.java.
void cu.trustGrapher.eventplayer.EventPlayer.reverse | ( | ) |
Plays the EventPlayer to play forward. Never modify the playState directly. Always use this.
Definition at line 160 of file EventPlayer.java.
void cu.trustGrapher.eventplayer.EventPlayer.setDelay | ( | int | value | ) |
Sets the delay of the timer. The Event Player will now tick after the new number of milliseconds.
value | the new millisecond value to set the timer delay to |
Definition at line 143 of file EventPlayer.java.
void cu.trustGrapher.eventplayer.EventPlayer.setEventsPerTick | ( | int | value | ) |
Sets the number of events for the EventPlayer to process after each tick. The viewers only update after all the events during each tick are processed.
value | The number of events to process during each tick |
Definition at line 152 of file EventPlayer.java.
Definition at line 27 of file EventPlayer.java.
final int cu.trustGrapher.eventplayer.EventPlayer.DEFAULT_DELAY = 250 [static] |
Definition at line 26 of file EventPlayer.java.
final int cu.trustGrapher.eventplayer.EventPlayer.DEFUALT_EVENTS_PER_TICK = 1 [package] |
Definition at line 26 of file EventPlayer.java.
List<TrustLogEvent> cu.trustGrapher.eventplayer.EventPlayer.events [protected] |
Definition at line 30 of file EventPlayer.java.
int cu.trustGrapher.eventplayer.EventPlayer.eventsPerTick [package] |
Definition at line 27 of file EventPlayer.java.
final int cu.trustGrapher.eventplayer.EventPlayer.FORWARD = 1 [package] |
Definition at line 25 of file EventPlayer.java.
List<EventPlayerListener> cu.trustGrapher.eventplayer.EventPlayer.listeners [protected] |
Definition at line 31 of file EventPlayer.java.
final int cu.trustGrapher.eventplayer.EventPlayer.PAUSE = 0 [package] |
Definition at line 25 of file EventPlayer.java.
final int cu.trustGrapher.eventplayer.EventPlayer.REVERSE = -1 [static] |
Definition at line 25 of file EventPlayer.java.
Timer cu.trustGrapher.eventplayer.EventPlayer.timer [protected] |
Definition at line 29 of file EventPlayer.java.
Definition at line 28 of file EventPlayer.java.