| 1 | package tmcsim.cadsimulator.videocontrol; |
|---|
| 2 | |
|---|
| 3 | /** |
|---|
| 4 | * DVDTitleUpdate is a container class used to notify observers of a DVD |
|---|
| 5 | * Controller when a title update occurs. The DVD's connection is used to |
|---|
| 6 | * uniquely identify a DVD player. So this connection information String should |
|---|
| 7 | * always be the same for all updates. The Abstract DVDController defines a |
|---|
| 8 | * getConnectionInfo() method that may be used for this purpise. The data members |
|---|
| 9 | * of this object are used to hold the current state of the DVD player when the |
|---|
| 10 | * update occurs. |
|---|
| 11 | * |
|---|
| 12 | * @author Matthew Cechini |
|---|
| 13 | * @version |
|---|
| 14 | */ |
|---|
| 15 | public class DVDTitleUpdate { |
|---|
| 16 | |
|---|
| 17 | /** DVD player's connection info. */ |
|---|
| 18 | public String connectionInfo = null; |
|---|
| 19 | |
|---|
| 20 | /** Current range being played. Null if none have played. */ |
|---|
| 21 | public DVDRange currentRange = null; |
|---|
| 22 | |
|---|
| 23 | /** Current incident being played. */ |
|---|
| 24 | public DVDIncident currentIncident = null; |
|---|
| 25 | |
|---|
| 26 | /** Boolean flag to designate whether an incident is currently playing. */ |
|---|
| 27 | public boolean isPlayingIncident = false; |
|---|
| 28 | |
|---|
| 29 | /** |
|---|
| 30 | * Boolean flag to designate whether the title is being repeated(true) or |
|---|
| 31 | * played for the first time(false). |
|---|
| 32 | */ |
|---|
| 33 | public boolean isRepeat = false; |
|---|
| 34 | |
|---|
| 35 | /** |
|---|
| 36 | * Constructor. |
|---|
| 37 | * |
|---|
| 38 | * @param connInfo DVD player connection info. |
|---|
| 39 | * @param range Current range being played. (may be null) |
|---|
| 40 | * @param incident Current Incident being played. (may be null) |
|---|
| 41 | * @param playingInc Playing incident flag. |
|---|
| 42 | * @param repeat Title repeated flag. |
|---|
| 43 | */ |
|---|
| 44 | public DVDTitleUpdate(String connInfo, DVDRange range, |
|---|
| 45 | DVDIncident incident, boolean playingInc, boolean repeat) |
|---|
| 46 | { |
|---|
| 47 | connectionInfo = connInfo; |
|---|
| 48 | currentRange = range; |
|---|
| 49 | currentIncident = incident; |
|---|
| 50 | isPlayingIncident = playingInc; |
|---|
| 51 | isRepeat = repeat; |
|---|
| 52 | |
|---|
| 53 | } |
|---|
| 54 | } |
|---|