Packagecom.flexcalendar.components.calendar.core.dataModel
Classpublic class CalendarItem
InheritanceCalendarItem Inheritance flash.events.EventDispatcher
Implements ICalendarItem

Class describing (single or recurring) calendar item.



Public Properties
 PropertyDefined By
  alarms : ArrayCollection
[read-only] Returns array collection of alarms - each of Alarm type
CalendarItem
  data : Object
CalendarItem
  daySpan : int
[read-only]
CalendarItem
  description : String
CalendarItem
  duration : Number
[read-only]
CalendarItem
  end : Date
CalendarItem
  itemColors : IRendererColors
CalendarItem
  itemId : String
CalendarItem
  itemSet : ICalendarItemSet
CalendarItem
  itemType : int
CalendarItem
  readOnly : Boolean
CalendarItem
  recur : Recur
CalendarItem
  start : Date
CalendarItem
  summary : String
CalendarItem
  tooltip : String
CalendarItem
Protected Properties
 PropertyDefined By
  range : DateRange
DateRange object, used to store start and end dates
CalendarItem
Public Methods
 MethodDefined By
  
CalendarItem(start:Date, end:Date, summary:String, description:String = null, readOnly:Boolean = false, itemColors:IRendererColors = null, tooltip:String = null)
Creates CalendarItem instance.
CalendarItem
  
addAlarm(alarm:Alarm):void
CalendarItem
  
getAlarmAt(index:int):Alarm
CalendarItem
  
getAlarmIndex(alarm:Alarm):int
CalendarItem
  
CalendarItem
  
getRecurrenceStartDates(from:Date, to:Date):Array
CalendarItem
  
isEditable():Boolean
CalendarItem
  
isRecurring():Boolean
CalendarItem
  
removeAlarm(alarm:Alarm):void
CalendarItem
  
setRange(start:Date, end:Date):void
CalendarItem
Protected Methods
 MethodDefined By
  
rangePropertyChangeHandler(event:PropertyChangeEvent):void
Handler for DateRange property change.
CalendarItem
Property Detail
alarmsproperty
alarms:ArrayCollection  [read-only]

Returns array collection of alarms - each of Alarm type


Implementation
    public function get alarms():ArrayCollection
dataproperty 
data:Object

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


Implementation
    public function get data():Object
    public function set data(value:Object):void
daySpanproperty 
daySpan:int  [read-only]


Implementation
    public function get daySpan():int
descriptionproperty 
description:String

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


Implementation
    public function get description():String
    public function set description(value:String):void
durationproperty 
duration:Number  [read-only]


Implementation
    public function get duration():Number
endproperty 
end:Date

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


Implementation
    public function get end():Date
    public function set end(value:Date):void
itemColorsproperty 
itemColors:IRendererColors

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


Implementation
    public function get itemColors():IRendererColors
    public function set itemColors(value:IRendererColors):void
itemIdproperty 
itemId:String

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


Implementation
    public function get itemId():String
    public function set itemId(value:String):void
itemSetproperty 
itemSet:ICalendarItemSet

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


Implementation
    public function get itemSet():ICalendarItemSet
    public function set itemSet(value:ICalendarItemSet):void
itemTypeproperty 
itemType:int

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


Implementation
    public function get itemType():int
    public function set itemType(value:int):void
rangeproperty 
protected var range:DateRange

DateRange object, used to store start and end dates

readOnlyproperty 
readOnly:Boolean

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


Implementation
    public function get readOnly():Boolean
    public function set readOnly(value:Boolean):void
recurproperty 
recur:Recur

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


Implementation
    public function get recur():Recur
    public function set recur(value:Recur):void
startproperty 
start:Date

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


Implementation
    public function get start():Date
    public function set start(value:Date):void
summaryproperty 
summary:String

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


Implementation
    public function get summary():String
    public function set summary(value:String):void
tooltipproperty 
tooltip:String

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


Implementation
    public function get tooltip():String
    public function set tooltip(value:String):void
Constructor Detail
CalendarItem()Constructor
public function CalendarItem(start:Date, end:Date, summary:String, description:String = null, readOnly:Boolean = false, itemColors:IRendererColors = null, tooltip:String = null)

Creates CalendarItem instance. Start and end times must be valid DateRange constructor parameters.

itemColors is the parameter you need to pass to set custom colors for calendarItem. Otherwise it's taken from styles definition. You can specify only those colors that you want to override from styles. If you set any property in passed RendererColors object to NaN (or null for Strings), default style-based property will be used. There is RendererColors objects' hierarchy (RendererColors > RendererColorsWithHeader > RendererColorsWithHeaderAndGradient.) that lets you specify growing numbers of properties. For some basic color sets there is RendererColorsFactory that creates you prepopulated RendererColors object based on color name only.

Parameters
start:Date — start time
 
end:Date — end time
 
summary:String — item summary, for example item title (accepts html text with basic html formatting tags)
 
description:String (default = null) — item description - optional details about this item
 
readOnly:Boolean (default = false) — read only item indicator
 
itemColors:IRendererColors (default = null) — colors object to describe color scheme for item
 
tooltip:String (default = null)

See also


Example
using RendererColorsFactory
           var item:CalendarItem = new CalendarItem(start, end, "Holidays", desc, readOnly, RendererColorsFactory.buildColorsWithGradient(RendererColors.GREEN));
          
Method Detail
addAlarm()method
public function addAlarm(alarm:Alarm):void

Parameters

alarm:Alarm

getAlarmAt()method 
public function getAlarmAt(index:int):Alarm

Parameters

index:int

Returns
Alarm
getAlarmIndex()method 
public function getAlarmIndex(alarm:Alarm):int

Parameters

alarm:Alarm

Returns
int
getAlarmsCount()method 
public function getAlarmsCount():int

Returns
int
getRecurrenceStartDates()method 
public function getRecurrenceStartDates(from:Date, to:Date):Array

Parameters

from:Date
 
to:Date

Returns
Array
isEditable()method 
public function isEditable():Boolean

Returns
Boolean
isRecurring()method 
public function isRecurring():Boolean

Returns
Boolean
rangePropertyChangeHandler()method 
protected function rangePropertyChangeHandler(event:PropertyChangeEvent):void

Handler for DateRange property change. Dispatches PropertyChange events for start and end fields

Parameters

event:PropertyChangeEvent

removeAlarm()method 
public function removeAlarm(alarm:Alarm):void

Parameters

alarm:Alarm

setRange()method 
public function setRange(start:Date, end:Date):void

Parameters

start:Date
 
end:Date