Package | com.bit101.components |
Class | public class Calendar |
Inheritance | Calendar ![]() ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
![]() |
color : int
Gets / sets the backgrond color of this panel.
|
Panel | |
![]() |
content : Sprite
Container for content added to this panel.
|
Panel | |
day : int [read-only]
Gets the current day.
|
Calendar | ||
![]() |
enabled : Boolean
Sets/gets whether this component is enabled or not.
|
Component | |
![]() |
gridColor : uint
Sets / gets the color of the grid lines.
|
Panel | |
![]() |
gridSize : int
Sets / gets the size of the grid.
|
Panel | |
![]() |
height : Number [override]
Sets/gets the height of the component.
|
Component | |
month : int [read-only]
Gets the current month.
|
Calendar | ||
selectedDate : Date [read-only]
Gets the currently selected Date.
|
Calendar | ||
![]() |
shadow : Boolean
Gets / sets whether or not this Panel will have an inner shadow.
|
Panel | |
![]() |
showGrid : Boolean
Sets / gets whether or not the grid will be shown.
|
Panel | |
![]() |
tag : int
Sets/gets in integer that can identify the component.
|
Component | |
![]() |
width : Number [override]
Sets/gets the width of the component.
|
Component | |
![]() |
x : Number [override] [write-only]
Overrides the setter for x to always place the component on a whole pixel.
|
Component | |
![]() |
y : Number [override] [write-only]
Overrides the setter for y to always place the component on a whole pixel.
|
Component | |
year : int [read-only]
Gets the current year.
|
Calendar |
Property | Defined By | ||
---|---|---|---|
![]() |
_background : Sprite | Panel | |
![]() |
_color : int = -1 | Panel | |
_dateLabel : Label | Calendar | ||
_day : int | Calendar | ||
_dayButtons : Array | Calendar | ||
![]() |
_enabled : Boolean = true | Component | |
![]() |
_gridColor : uint = 0xd0d0d0 | Panel | |
![]() |
_gridSize : int = 10 | Panel | |
![]() |
_height : Number = 0 | Component | |
![]() |
_mask : Sprite | Panel | |
_month : int | Calendar | ||
_monthNames : Array | Calendar | ||
![]() |
Ronda : Class | Component | |
_selection : Shape | Calendar | ||
![]() |
_shadow : Boolean = true | Panel | |
![]() |
_showGrid : Boolean = false | Panel | |
![]() |
_tag : int = -1 | Component | |
![]() |
_width : Number = 0 | Component | |
_year : int | Calendar |
Method | Defined By | ||
---|---|---|---|
Calendar(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0)
Constructor
|
Calendar | ||
![]() |
draw():void
[override]
Draws the visual ui of the component.
|
Panel | |
![]() |
initStage(stage:Stage):void
[static]
Utility method to set up usual stage align and scaling.
|
Component | |
![]() |
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
|
Component | |
setDate(date:Date):void
Displays specified date in calendar by drawing that month and year and highlighting the day.
|
Calendar | ||
![]() |
setSize(w:Number, h:Number):void
Sets the size of the component.
|
Component | |
setYearMonthDay(year:int, month:int, day:int):void
Displays specified date in calendar by drawing that month and year and highlighting the day.
|
Calendar |
Method | Defined By | ||
---|---|---|---|
addChildren():void
[override]
Creates and adds the child display objects of this component.
|
Calendar | ||
![]() |
drawGrid():void
|
Panel | |
getEndDay(month:int, year:int):int
Gets the last day of the specfied month and year.
|
Calendar | ||
![]() |
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
|
Component | |
init():void
[override]
Initializes the component.
|
Calendar | ||
![]() |
invalidate():void
Marks the component to be redrawn on the next frame.
|
Component | |
onDayClick(event:MouseEvent):void
Called when a date button is clicked.
|
Calendar | ||
![]() |
onInvalidate(event:Event):void
Called one frame after invalidate is called.
|
Component | |
onNextMonth(event:MouseEvent):void
Advances the month forward by one.
|
Calendar | ||
onNextYear(event:MouseEvent):void
Advances the year forward by one.
|
Calendar | ||
onPrevMonth(event:MouseEvent):void
Moves the month back by one.
|
Calendar | ||
onPrevYear(event:MouseEvent):void
Moves the year back by one.
|
Calendar |
_dateLabel | property |
protected var _dateLabel:Label
_day | property |
protected var _day:int
_dayButtons | property |
protected var _dayButtons:Array
_month | property |
protected var _month:int
_monthNames | property |
protected var _monthNames:Array
_selection | property |
protected var _selection:Shape
_year | property |
protected var _year:int
day | property |
day:int
[read-only]
Gets the current day.
public function get day():int
month | property |
month:int
[read-only]
Gets the current month.
public function get month():int
selectedDate | property |
selectedDate:Date
[read-only]
Gets the currently selected Date.
public function get selectedDate():Date
year | property |
year:int
[read-only]
Gets the current year.
public function get year():int
Calendar | () | Constructor |
public function Calendar(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0)
Constructor
Parameters
parent:DisplayObjectContainer (default = null ) — The parent DisplayObjectContainer on which to add this component.
|
|
xpos:Number (default = 0 ) — The x position to place this component.
|
|
ypos:Number (default = 0 ) — The y position to place this component.
|
addChildren | () | method |
override protected function addChildren():void
Creates and adds the child display objects of this component.
getEndDay | () | method |
protected function getEndDay(month:int, year:int):int
Gets the last day of the specfied month and year. Needed by layout.
Parameters
month:int — The month to get the last day of.
|
|
year:int — The year in which the month is in (needed for leap years).
|
int — The last day of the month.
|
init | () | method |
override protected function init():void
Initializes the component.
onDayClick | () | method |
protected function onDayClick(event:MouseEvent):void
Called when a date button is clicked. Selects that date.
Parameters
event:MouseEvent |
onNextMonth | () | method |
protected function onNextMonth(event:MouseEvent):void
Advances the month forward by one.
Parameters
event:MouseEvent |
onNextYear | () | method |
protected function onNextYear(event:MouseEvent):void
Advances the year forward by one.
Parameters
event:MouseEvent |
onPrevMonth | () | method |
protected function onPrevMonth(event:MouseEvent):void
Moves the month back by one.
Parameters
event:MouseEvent |
onPrevYear | () | method |
protected function onPrevYear(event:MouseEvent):void
Moves the year back by one.
Parameters
event:MouseEvent |
setDate | () | method |
public function setDate(date:Date):void
Displays specified date in calendar by drawing that month and year and highlighting the day.
Parameters
date:Date — The date to display.
|
setYearMonthDay | () | method |
public function setYearMonthDay(year:int, month:int, day:int):void
Displays specified date in calendar by drawing that month and year and highlighting the day.
Parameters
year:int — The year to display.
|
|
month:int — The month to display.
|
|
day:int — The day to display.
|