Package | com.ithaca.timeline |
Class | public class TimeRange |
Inheritance | TimeRange flash.events.EventDispatcher |
Property | Defined By | ||
---|---|---|---|
begin : Number [read-only]
The begining of the range
| TimeRange | ||
duration : Number [read-only]
The sum of duration of each intervals (the time holes are taken into account)
| TimeRange | ||
end : Number [read-only]
The end of the range
| TimeRange | ||
numIntervals : Number [read-only]
return the number of intervals (this the number of time holes + 1)
| TimeRange | ||
_ranges : ArrayCollection
The current time intervals ; the limits are stored as a list:(begin1, end1, begin2, end2, ...., beginn, endn)
| TimeRange | ||
timeHoleWidth : Number = 10
gap between two intervals (width of the time hole) ; must be used in each component that render time hole. | TimeRange | ||
totalDuration : Number [read-only]
The duration of the range without taking into account the time holes
| TimeRange |
Method | Defined By | ||
---|---|---|---|
TimeRange | |||
addTime(beginValue:Number, endValue:Number, fillHole:Boolean = false):void
Builds a new list of time intervals with the current list and a new time interval
| TimeRange | ||
changeLimits(begin:Number, end:Number):void
Changes the begin an the end of the time to consider, but the intervals stay the same. | TimeRange | ||
isEmpty():Boolean | TimeRange | ||
makeTimeHole(beginValue:Number, endValue:Number):void
Makes a time hole between the startValue and endValue. | TimeRange | ||
positionToTime(positionValue:Number, width:Number):Number
Converts the positon to a time for a given witdh of component
| TimeRange | ||
reset():void
Restores the intervals and the begin / end of time to consider from the saved intervals list. | TimeRange | ||
resetLimits():void
Restores the begin and the end of time to consider from the intervals list ; in order to cancel a zoom for example. | TimeRange | ||
shiftLimits(delta:Number):void
Adds the same time value both to the begin and to the end of the TimeRange
| TimeRange | ||
timeToPosition(timeValue:Number, width:Number):Number
Converts a time to a position for a given witdh of component
| TimeRange | ||
Update values from another TimeRange
| TimeRange |
_ranges | property |
public var _ranges:ArrayCollection
The current time intervals ; the limits are stored as a list:(begin1, end1, begin2, end2, ...., beginn, endn)
begin | property |
begin:Number
[read-only] The begining of the range
public function get begin():Number
duration | property |
duration:Number
[read-only] The sum of duration of each intervals (the time holes are taken into account)
public function get duration():Number
end | property |
end:Number
[read-only] The end of the range
public function get end():Number
numIntervals | property |
numIntervals:Number
[read-only] return the number of intervals (this the number of time holes + 1)
public function get numIntervals():Number
timeHoleWidth | property |
public var timeHoleWidth:Number = 10
gap between two intervals (width of the time hole) ; must be used in each component that render time hole.
totalDuration | property |
totalDuration:Number
[read-only] The duration of the range without taking into account the time holes
public function get totalDuration():Number
TimeRange | () | Constructor |
public function TimeRange()
addTime | () | method |
public function addTime(beginValue:Number, endValue:Number, fillHole:Boolean = false):void
Builds a new list of time intervals with the current list and a new time interval
Parameters
beginValue:Number — begin of the new inteval
| |
endValue:Number — end of the new inteval
| |
fillHole:Boolean (default = false ) — if true the interval between the current list and the new interval is considered as valid and usable; otherwise this time hole is preseved
|
changeLimits | () | method |
public function changeLimits(begin:Number, end:Number):void
Changes the begin an the end of the time to consider, but the intervals stay the same. It is used to make a zoom.
Parameters
begin:Number | |
end:Number |
isEmpty | () | method |
public function isEmpty():Boolean
Returns
Boolean — there'
|
makeTimeHole | () | method |
public function makeTimeHole(beginValue:Number, endValue:Number):void
Makes a time hole between the startValue and endValue.
Parameters
beginValue:Number — lower limit of the time hole interval
| |
endValue:Number — higher limit of the time hole interval
|
positionToTime | () | method |
public function positionToTime(positionValue:Number, width:Number):Number
Converts the positon to a time for a given witdh of component
Parameters
positionValue:Number — the position in the renderer component
| |
width:Number — The width of the renderer component
|
Number — time in milliseconds
|
reset | () | method |
public function reset():void
Restores the intervals and the begin / end of time to consider from the saved intervals list. It is used to cancel all zooms and time holes for example.
resetLimits | () | method |
public function resetLimits():void
Restores the begin and the end of time to consider from the intervals list ; in order to cancel a zoom for example.
shiftLimits | () | method |
public function shiftLimits(delta:Number):void
Adds the same time value both to the begin and to the end of the TimeRange
Parameters
delta:Number — time in milliseconds to add.
|
timeToPosition | () | method |
public function timeToPosition(timeValue:Number, width:Number):Number
Converts a time to a position for a given witdh of component
Parameters
timeValue:Number — time in milliseconds
| |
width:Number — The width of the renderer component
|
Number — the position in the renderer component
|
update | () | method |
public function update(tr:TimeRange):void
Update values from another TimeRange
Parameters
tr:TimeRange — the TimeRange to update from
|