This class is the view of the first tab in the TabView class. Shows the video, the car animation and the charts of oil, charge and inverter
| private | GraphBar | chargeBar | |
| private | GraphBar | inverterBar | |
| private | GraphBar | oilBar | |
| private | Button | controlBtn | |
| private | MovieClip | carAnimation | |
| private | MovieClip | video | |
| private | Boolean | playing = false |
Information() |
| public | onOrderReceived(item:Object) | ||
| public | click() | ||
| private | init() |
private chargeBar:GraphBar
A GraphBar instance that has been initialized on the stage with instance name chargeBar
private inverterBar:GraphBar
A GraphBar instance that has been initialized on the stage with instance name inverterBar
private oilBar:GraphBar
A GraphBar instance that has been initialized on the stage with instance name oilBar
private controlBtn:Button
A Button instance that has been initialized on the stage with instance name controlBtn
private carAnimation:MovieClip
A Movie Clip where the car animation will be loaded
private video:MovieClip
A Movie Clip where the external video will be loaded
private playing:Boolean = false
A boolean indicating if the video is playing (true) or not (false)
Information()
public onOrderReceived(item:Object):Void
Description: sets the value of the three GraphBar with the data received
This function is an implementation of the method onOrderReceived of the interface OrderReceivedListener
Assumptions: - chargeBar, inverterBar and oilBar are instantiated
- ALPHA, GAMA, HYDRO are members of the item received from the server
Globals: uses the following globals:
chargeBar, inverterBar and oilBar
Calls: none
Is Called by: This function is called by broadcastOrderReceived() in the application(TrioMotor class)
- Parameters
item (Object)-- Returns
- Void
- See Also
- OrderReceivedListener.onOrderReceived
public click():Void
Description: Stops or Plays the video depending of its state. Sets the variable playing to reflect the video state
Assumptions: ControlBtn and video are instantiated
Globals: uses the following globals: playing, controlBtn and video
Calls: stop() or play() of the video Object
Is Called by: This function is called when the user click the controlBtn
- Returns
- Void
private init():Void
Description: Registers this object as listener of OrderReceived event in the application
Registers this object as listener of click event in the controlBtn
Loads the car animation and the video in its respective MovieClips
Assumptions: application, controlBtn, video are instantiated Globals: uses application Calls: addOrderReceivedListener() in the application Is Called by: setApplication() in its super class AbstractView
- Returns
- Void