Packagecom.flexcalendar.components.calendar.displayClasses.grids
Classpublic class DayViewGrid
InheritanceDayViewGrid Inheritance BaseGrid Inheritance mx.core.UIComponent
Implements IRenderersContainer, IDateRangeAware

Hour grid - responsible for drawing hour labels & grid in day/multiday view



Public Properties
 PropertyDefined By
  currentDayHighlighted : Boolean
[write-only]
DayViewGrid
  currentTimeIndicator : Boolean
True if component should draw current time indicator, false otherwise.
DayViewGrid
  currentTimeIndicatorDelay : Number
Current time indicator delay refresh.
DayViewGrid
  itemsSurface : UIComponent
DayViewGrid
  visibleItemsDetails : Array
[override] Array of visible ItemsDetails, sorted by start date.
DayViewGrid
  visibleSpacesDetails : Array
[override]
DayViewGrid
Protected Properties
 PropertyDefined By
  availableSpaceRenderersFactory : ClassFactory
Class factory for available space renderers
DayViewGrid
 Inherited_backgroundAlpha : Number
Holds read style value
BaseGrid
 Inherited_backgroundColor : uint
Holds read style value
BaseGrid
 Inherited_columnLineAlpha : Number
Holds read style value
BaseGrid
 Inherited_columnLineColor : uint
Holds read style value
BaseGrid
 Inherited_columnLineThickness : Number
Holds read style value
BaseGrid
 Inheritedcontext : ICalendarContext
Calendar context - holds calendar configuration parameters, services etc.
BaseGrid
 Inherited_currentDayBackgroundAlpha : Number
Holds read style value
BaseGrid
 Inherited_currentDayBackgroundColor : uint
Holds read style value
BaseGrid
 Inherited_currentDayHighlighted : Boolean
Holds read style value
BaseGrid
 InheriteditemRenderersFactory : ClassFactory
Class factory for default item renderers
BaseGrid
 Inherited_lineAlpha : Number
Holds read style value
BaseGrid
 Inherited_lineColor : uint
Holds read style value
BaseGrid
 Inherited_lineThickness : Number
Holds read style value
BaseGrid
 Inherited_movingItemAlpha : Number
Holds read style value
BaseGrid
  unavailableSpaceRenderersFactory : ClassFactory
Class factory for unavailable space renderers
DayViewGrid
 Inherited_visibleItemsDetails : Array
BaseGrid
Public Methods
 MethodDefined By
  
DayViewGrid(context:ICalendarContext, itemRenderersFactory:ClassFactory, calendarAvailableSpaceRenderersFactory:ClassFactory, calendarUnavailableSpaceRenderersFactory:ClassFactory)
Creates HourGrid instance
DayViewGrid
  
deleteItemDetails(deletedItemDetails:ItemDetails):void
Delete item details.
DayViewGrid
  
Ends drag or resize
DayViewGrid
  
getItemSetIndex(localPosition:Point):Number
Get index of calendar item's set.
DayViewGrid
  
getSurfaceForDisplayObject(displayObject:DisplayObject):UIComponent
DayViewGrid
  
isAvailableSpaceForGivenPeriod(from:Date, to:Date, calendarSet:ICalendarItemSet):Boolean
Methods that verifies whether item can be placed in given period for given calendar.
DayViewGrid
  
layoutMovingItemDetails(movingRenderer:ICalendarItemRenderer, startGlobalPosition:Point, dragStartItemStartMinutes:int, currentGlobalPosition:Point, forceDragBetweenColumns:Boolean = false):Number
Layout item renderer when item renderer is moved.
DayViewGrid
  
layoutResizingItemDetails(resizingRenderer:ICalendarItemRenderer, startGlobalPosition:Point, dragStartItemEndMinutes:int, currentGlobalPosition:Point, forceLayout:Boolean = false):void
Layout item renderer when it is resized
DayViewGrid
  
pointToDate(point:Point):Date
[override] Compute date associated with point selected by mouse (x, y)
DayViewGrid
  
removeRenderers(itemDetails:ItemDetails):void
[override] Remove all renderers for item details.
DayViewGrid
  
Called when item details movement or resize was canceled or could not be performed
DayViewGrid
  
Set visible range.
DayViewGrid
  
updateItemDetails(updatedItemDetails:ItemDetails):void
Update or create item details.
DayViewGrid
Protected Methods
 MethodDefined By
 Inherited
Adds mouse event for clicking and double-clicking on the component
BaseGrid
  
Create current time indicator and set its properties.
DayViewGrid
  
Create surface to draw grid lines onto
DayViewGrid
 Inherited
normalizePoint(point:Point):Point
Normalize point - change minimal position to 0 and maximum to unscaled width or unscaled height.
BaseGrid
  
[override] Function for reading style values.
DayViewGrid
Styles
 Style Description Defined By
 InheritedType: Number CSS Inheritance: no
Background alpha.
BaseGrid
 InheritedType: uint Format: Color CSS Inheritance: no
Background color for days grid.
BaseGrid
 InheritedType: Number CSS Inheritance: no
Background alpha for current day.
BaseGrid
 InheritedType: uint Format: Color CSS Inheritance: no
Background color for current day.
BaseGrid
 InheritedType: Boolean CSS Inheritance: no
Current day highlighted or not.
BaseGrid
  
currentTimeIndicatorAlpha
Type: Number CSS Inheritance: yes
Current time indicator alpha. The default value is 0.8.
DayViewGrid
  
currentTimeIndicatorColor
Type: uint Format: Color CSS Inheritance: yes
Color of the current time indicator The default value is 0xff7f6e;.
DayViewGrid
  
currentTimeIndicatorHeight
Type: Number Format: Length CSS Inheritance: no
Width of the current time indicator The default value is 2;.
DayViewGrid
  
itemsOverlapping
Type: Number Format: Length CSS Inheritance: no
Items overlapping, in pixels The default value is 10;.
DayViewGrid
  
leftFreeSpace
Type: Number Format: Length CSS Inheritance: no
Space free from the left side The default value is 2;.
DayViewGrid
 InheritedType: Number CSS Inheritance: no
Line alpha.
BaseGrid
 InheritedType: uint Format: Color CSS Inheritance: no
Color of grid lines.
BaseGrid
 InheritedType: Number Format: Length CSS Inheritance: no
Grid line thickness.
BaseGrid
  
middleHourLinesGapSize
Type: Number Format: Length CSS Inheritance: no
Gap size in middle hours line style The default value is 1;.
DayViewGrid
  
minimumRendererHeight
Type: Number Format: Length CSS Inheritance: no
Minimum renderer height The default value is 20;.
DayViewGrid
 InheritedType: Number CSS Inheritance: no
Moving renderer alpha.
BaseGrid
  
rightFreeSpace
Type: Number Format: Length CSS Inheritance: no
Space free from the right side The default value is 10;.
DayViewGrid
Property Detail
availableSpaceRenderersFactoryproperty
protected var availableSpaceRenderersFactory:ClassFactory

Class factory for available space renderers

currentDayHighlightedproperty 
currentDayHighlighted:Boolean  [write-only]


Implementation
    public function set currentDayHighlighted(value:Boolean):void
currentTimeIndicatorproperty 
currentTimeIndicator:Boolean

True if component should draw current time indicator, false otherwise. Set this value to control current time indicator visibility.

This property can be used as the source for data binding.


Implementation
    public function get currentTimeIndicator():Boolean
    public function set currentTimeIndicator(value:Boolean):void
currentTimeIndicatorDelayproperty 
currentTimeIndicatorDelay:Number

Current time indicator delay refresh. Controlls how often current time indicatro should be redrawn.

This property can be used as the source for data binding.


Implementation
    public function get currentTimeIndicatorDelay():Number
    public function set currentTimeIndicatorDelay(value:Number):void
itemsSurfaceproperty 
public var itemsSurface:UIComponent

unavailableSpaceRenderersFactoryproperty 
protected var unavailableSpaceRenderersFactory:ClassFactory

Class factory for unavailable space renderers

visibleItemsDetailsproperty 
visibleItemsDetails:Array[override]

Array of visible ItemsDetails, sorted by start date.


Implementation
    public function get visibleItemsDetails():Array
    public function set visibleItemsDetails(value:Array):void
visibleSpacesDetailsproperty 
visibleSpacesDetails:Array[override]


Implementation
    public function get visibleSpacesDetails():Array
    public function set visibleSpacesDetails(value:Array):void
Constructor Detail
DayViewGrid()Constructor
public function DayViewGrid(context:ICalendarContext, itemRenderersFactory:ClassFactory, calendarAvailableSpaceRenderersFactory:ClassFactory, calendarUnavailableSpaceRenderersFactory:ClassFactory)

Creates HourGrid instance

Parameters
context:ICalendarContext
 
itemRenderersFactory:ClassFactory
 
calendarAvailableSpaceRenderersFactory:ClassFactory
 
calendarUnavailableSpaceRenderersFactory:ClassFactory
Method Detail
createCurrentTimeIndicatorComponent()method
protected function createCurrentTimeIndicatorComponent():void

Create current time indicator and set its properties.

createSurfaces()method 
protected function createSurfaces():void

Create surface to draw grid lines onto

deleteItemDetails()method 
public function deleteItemDetails(deletedItemDetails:ItemDetails):void

Delete item details.

Parameters

deletedItemDetails:ItemDetails — item to delete.

endDragOrResize()method 
public function endDragOrResize():void

Ends drag or resize

getItemSetIndex()method 
public function getItemSetIndex(localPosition:Point):Number

Get index of calendar item's set. If column mode is disabled then return NaN.

Parameters

localPosition:Point — local position on grid.

Returns
Number — index of calendar item's set where is mouse.
getSurfaceForDisplayObject()method 
public function getSurfaceForDisplayObject(displayObject:DisplayObject):UIComponent

Parameters

displayObject:DisplayObject

Returns
UIComponent
isAvailableSpaceForGivenPeriod()method 
public function isAvailableSpaceForGivenPeriod(from:Date, to:Date, calendarSet:ICalendarItemSet):Boolean

Methods that verifies whether item can be placed in given period for given calendar.

Parameters

from:Date
 
to:Date
 
calendarSet:ICalendarItemSet

Returns
Boolean
layoutMovingItemDetails()method 
public function layoutMovingItemDetails(movingRenderer:ICalendarItemRenderer, startGlobalPosition:Point, dragStartItemStartMinutes:int, currentGlobalPosition:Point, forceDragBetweenColumns:Boolean = false):Number

Layout item renderer when item renderer is moved.

Parameters

movingRenderer:ICalendarItemRenderer — item renderer to layout.
 
startGlobalPosition:Point — start click position, in global coordinates.
 
dragStartItemStartMinutes:int — current mouse position, in global coordinates.
 
currentGlobalPosition:Point — force drag between columns in column mode even though {
 
forceDragBetweenColumns:Boolean (default = false)

Returns
Number
layoutResizingItemDetails()method 
public function layoutResizingItemDetails(resizingRenderer:ICalendarItemRenderer, startGlobalPosition:Point, dragStartItemEndMinutes:int, currentGlobalPosition:Point, forceLayout:Boolean = false):void

Layout item renderer when it is resized

Parameters

resizingRenderer:ICalendarItemRenderer — item renderer to layout
 
startGlobalPosition:Point — start mouse click position, in global coordinates
 
dragStartItemEndMinutes:int — current mouse position, in global coordinates
 
currentGlobalPosition:Point — - when item is moving in column mode, and it's allowed to move it between columns, the index of targeted visible calendar item set should be passed here
 
forceLayout:Boolean (default = false)

pointToDate()method 
override public function pointToDate(point:Point):Date

Compute date associated with point selected by mouse (x, y)

Parameters

point:Point — selected point

Returns
Date — associated date
readStyleValues()method 
override protected function readStyleValues():void

Function for reading style values.

removeRenderers()method 
override public function removeRenderers(itemDetails:ItemDetails):void

Remove all renderers for item details.

Parameters

itemDetails:ItemDetails — item which renderers will be removed.

resetCurrentlyChangedItemDetails()method 
public function resetCurrentlyChangedItemDetails(itemDetailsToReset:ItemDetails):void

Called when item details movement or resize was canceled or could not be performed

Parameters

itemDetailsToReset:ItemDetails

setVisibleRange()method 
public function setVisibleRange(value:DateRange):void

Set visible range. When changing this value, number of days is set appropriately.

Parameters

value:DateRange

updateItemDetails()method 
public function updateItemDetails(updatedItemDetails:ItemDetails):void

Update or create item details. Move renderers in new place and redraw layout.

Parameters

updatedItemDetails:ItemDetails — item to update.