This class is in charge of painting graphics in various components. It is a wrapper of the Draw API that creates some basic figures
| private | MovieClip | handleClip | |
| private | MovieClip | clip | |
| public | Number | backgroundRGB | |
| public | Number | borderRGB | |
| public | Number | hightLightRGB | |
| private | Number | rgb | |
| private | Number | thickness = 1 | |
| private | Number | hightLightThickness = 1 | |
| private | Number | alpha = 100 | |
| private | Number | lineThickness = undefined | |
| private | Number | lineRgb |
Graphics(hClip:MovieClip, l:Number) |
| public | draw3DRect(x:Number, y:Number, w:Number, h:Number) | ||
| public | drawRect(x:Number, y:Number, w:Number, h:Number) | ||
| public | fillRect(x:Number, y:Number, w:Number, h:Number) | ||
| public | setColor(c:Number) | ||
| public | clearAll() | ||
| public | setLocation(xPos:Number, yPos:Number) | ||
| public | getClip() |
private handleClip:MovieClip
A parent Movie clip that holds this clip
private clip:MovieClip
A Movie clip where this will be painted
public backgroundRGB:Number
background color of this graphic
public borderRGB:Number
border color of this graphic
public hightLightRGB:Number
highlight color of this graphic
private rgb:Number
color of this graphic
private thickness:Number = 1
thickness of this graphic, defaults to 1
private hightLightThickness:Number = 1
highlight thickness of this graphic, default to 1
private alpha:Number = 100
alpha value of this graphic, defaults to 100 (opaque)
private lineThickness:Number = undefined
line thickness of this graphic
private lineRgb:Number
line color of this graphic
Graphics(hClip:MovieClip,
l:Number)
Description: Contructor that instantiates handleClip and clip
Globals: instantiates the following globals: handleClip and clip
Calls: createEmptyMovieClip() in the handleClip
Is Called by: GraphBar, BayScheduling
- Parameters
hClip (MovieClip)-l (Number)- The level where the clip will be created
public draw3DRect(x:Number,
y:Number,
w:Number,
h:Number):Void
Description: Draws a 3D Rectangle with the data received
Assumptions: clip has already been instantiated
Globals: uses the following globals:
rgb, backgroundRGB, borderRGB, hightLightRGB, thickness, hightLightThickness
Calls: fillRect() drawRect()
Is Called by: drawRecommended() and drawSelected() in the BaySchedule class
- Parameters
x (Number)- positiony (Number)- positionw (Number)- widthh (Number)- height- Returns
- Void
public drawRect(x:Number,
y:Number,
w:Number,
h:Number):Void
Description: Draws a 2D Rectangle without fill with the data received
Assumptions: clip has already been instantiated
Globals: uses thickness
Calls: fillRect()
Is Called by: draw3DRect()
- Parameters
x (Number)- positiony (Number)- positionw (Number)- widthh (Number)- height- Returns
- Void
public fillRect(x:Number,
y:Number,
w:Number,
h:Number):Void
Description: Draws a 2D Rectangle filled with the data received
Assumptions: clip has already been instantiated
Globals: use the following globals:
rgb, alpha, lineRgb, lineThickness
Calls: beginFill(), lineStyle(), moveTo(), lineTo(), endFill() on the clip Object
Is Called by: draw3DRect(), drawRect()
- Parameters
x (Number)- positiony (Number)- positionw (Number)- widthh (Number)- height- Returns
- Void
public setColor(c:Number):Void
Description: sets the RGB Color
Globals: uses global rgb
Calls: none
Is Called by: draw3DRect(), drawRect() in this object
onLoad() in GraphBar
setBarsStyle(), drawRecommended(), drawSelected() in BaySchedule
- Parameters
c (Number)- color- Returns
- Void
public clearAll():Void
Description: clears all the graphics in this Object
Assumptions: clip has already been instantiated
Globals: uses the global clip
Calls: clear() in the clip property
Is Called by: set value() in GraphBar
bayChangeEvent(), drawRecommendedSpaces(), setData(), and setSelectedDate() in BaySchedule
- Returns
- Void
public setLocation(xPos:Number,
yPos:Number):Void
Description: sets the X and Y positions Assumptions: clip has already been instantiated Globals: uses the global clip Calls: none Is Called by: onLoad() in GraphBar
setBarsStyle() in BaySchedule
- Parameters
xPos (Number)- x PositionyPos (Number)- y Position- Returns
- Void
public getClip():MovieClip
Description: returns a reference of this clip
Assumptions: clip has already been instantiated
Globals: uses the global clip
Calls: none
Is Called by: onLoad() in BaySchedule
- Returns
- MovieClip