Packagecom.keepcore.calendar.view
Classpublic class CalendarPartDisplayer
InheritanceCalendarPartDisplayer Inheritance mx.core.UIComponent
Subclasses CalendarDayDisplayer, CalendarMonthDisplayer

The CalendarPartDisplayer class defines the abstract class that calendar parts inherits from (day cells and headers & month cells). It mainly manages mouse moves.



Public Properties
 PropertyDefined By
  calendarPart : CalendarPart
Calendar part reference.
CalendarPartDisplayer
  drawToolTip : Boolean
Indicates if the part handles the tool tip drawing.
CalendarPartDisplayer
  fullDayToolTip : Boolean
Indicates if the displayed tooltip is always full day (used by day headers as example).
CalendarPartDisplayer
  mouseOverDate : Date
Indicates the current mouse over date.
CalendarPartDisplayer
  mouseOverDateColumn : int
Indicates the current mouse over date column (if column mode is enabled).
CalendarPartDisplayer
Public Methods
 MethodDefined By
  
Contructor.
CalendarPartDisplayer
  
In column mode, return the column width (takes in account the item margins).
CalendarPartDisplayer
  
If column mode is enabled, return the column index according to mouse X position.
CalendarPartDisplayer
  
localToDateTime(coordX:Number = -1, coordY:Number = -1, onlyCurrentDayTime:Boolean = false, eventTimeStepMultiple:Boolean = true):Date
return the date specified by mouse position in the current cell this function is used to determine the new date range of an item function overrided in children
CalendarPartDisplayer
  
refreshMouseTooltip(event:MouseEvent):void
Create or update the cell mouse tooltip.
CalendarPartDisplayer
Protected Methods
 MethodDefined By
  
createMouseToolTip(date:Date, x:Number, y:Number):void
CalendarPartDisplayer
  
CalendarPartDisplayer
  
drawHighlight(unscaledWidth:Number, columnWidth:Number, stepStartY:Number, stepHeight:Number, highlightAlpha:Number, rangeSelection:Boolean, noBorder:Boolean = false):void
CalendarPartDisplayer
  
drawRanges(ranges:ArrayCollection, aX:Number, aWidth:Number, bkgColor:uint, alpha:Number):void
Draw ranges.
CalendarPartDisplayer
  
getRangesRect(ranges:ArrayCollection, aX:Number, aWidth:Number):Array
Return array of Rectangle objects that defines the ranges coordinates.
CalendarPartDisplayer
  
updateMouseToolTip(date:Date, x:Number, y:Number):void
CalendarPartDisplayer
Property Detail
calendarPartproperty
calendarPart:CalendarPart

Calendar part reference.


Implementation
    public function get calendarPart():CalendarPart
    public function set calendarPart(value:CalendarPart):void
drawToolTipproperty 
drawToolTip:Boolean

Indicates if the part handles the tool tip drawing.

The default value is true.


Implementation
    public function get drawToolTip():Boolean
    public function set drawToolTip(value:Boolean):void
fullDayToolTipproperty 
fullDayToolTip:Boolean

Indicates if the displayed tooltip is always full day (used by day headers as example).

The default value is false.


Implementation
    public function get fullDayToolTip():Boolean
    public function set fullDayToolTip(value:Boolean):void
mouseOverDateproperty 
mouseOverDate:Date

Indicates the current mouse over date. Is null if there is no mouse over on this cell.


Implementation
    public function get mouseOverDate():Date
    public function set mouseOverDate(value:Date):void
mouseOverDateColumnproperty 
mouseOverDateColumn:int

Indicates the current mouse over date column (if column mode is enabled).


Implementation
    public function get mouseOverDateColumn():int
    public function set mouseOverDateColumn(value:int):void
Constructor Detail
CalendarPartDisplayer()Constructor
public function CalendarPartDisplayer(calendarPart:CalendarPart)

Contructor.

Parameters
calendarPart:CalendarPart
Method Detail
createMouseToolTip()method
protected function createMouseToolTip(date:Date, x:Number, y:Number):void

Parameters

date:Date
 
x:Number
 
y:Number

destroyMouseToolTip()method 
protected function destroyMouseToolTip():void

drawHighlight()method 
protected function drawHighlight(unscaledWidth:Number, columnWidth:Number, stepStartY:Number, stepHeight:Number, highlightAlpha:Number, rangeSelection:Boolean, noBorder:Boolean = false):void

Parameters

unscaledWidth:Number
 
columnWidth:Number
 
stepStartY:Number
 
stepHeight:Number
 
highlightAlpha:Number
 
rangeSelection:Boolean
 
noBorder:Boolean (default = false)

drawRanges()method 
protected function drawRanges(ranges:ArrayCollection, aX:Number, aWidth:Number, bkgColor:uint, alpha:Number):void

Draw ranges.

Parameters

ranges:ArrayCollection — array of ranges (DateRange objects) to draw
 
aX:Number — x offset
 
aWidth:Number — width to draw
 
bkgColor:uint — background color to use
 
alpha:Number — alpha level to use

getColumnWidth()method 
public function getColumnWidth():Number

In column mode, return the column width (takes in account the item margins).

Returns
Number — column width
getRangesRect()method 
protected function getRangesRect(ranges:ArrayCollection, aX:Number, aWidth:Number):Array

Return array of Rectangle objects that defines the ranges coordinates.

Parameters

ranges:ArrayCollection — array of ranges (DateRange objects)
 
aX:Number — x offset
 
aWidth:Number — width

Returns
Array
localToColumn()method 
public function localToColumn():int

If column mode is enabled, return the column index according to mouse X position.

Returns
int — column index or -1 if column mode is disabled or if view mode is not day or week.
localToDateTime()method 
public function localToDateTime(coordX:Number = -1, coordY:Number = -1, onlyCurrentDayTime:Boolean = false, eventTimeStepMultiple:Boolean = true):Date

return the date specified by mouse position in the current cell this function is used to determine the new date range of an item function overrided in children

Parameters

coordX:Number (default = -1)
 
coordY:Number (default = -1)
 
onlyCurrentDayTime:Boolean (default = false)
 
eventTimeStepMultiple:Boolean (default = true)

Returns
Date
refreshMouseTooltip()method 
public function refreshMouseTooltip(event:MouseEvent):void

Create or update the cell mouse tooltip.

Parameters

event:MouseEvent — mouse event used to set the tooltip position

updateMouseToolTip()method 
protected function updateMouseToolTip(date:Date, x:Number, y:Number):void

Parameters

date:Date
 
x:Number
 
y:Number