Packagecom.ithaca.timeline
Classpublic class Timeline
InheritanceTimeline Inheritance LayoutNode Inheritance spark.components.SkinnableContainer

The main component of the package and the entry point of the API.

Default MXML PropertymxmlContentFactory



Public Properties
 PropertyDefined By
  activity : Trace = null
Activity trace
Timeline
  begin : Number
[read-only]
Timeline
  contextFollowCursor : Boolean
[read-only]
Timeline
  cssStyleSheetCollection : IStyleSheetCollection
Timeline
  currentTime : Number
Modify the current time value.
Timeline
  currrentRelativeTime : Number
[read-only]
Timeline
  dateFormatter : DateFormatter
Timeline
  debug : Object
Timeline
  duration : Number
[read-only]
Timeline
  end : Number
[read-only]
Timeline
  endAlertBeforeTime : Number = 30000
Timeline
  isPlaying : Boolean
[read-only]
Timeline
  isRelativeTimeMode : Boolean
[read-only]
Timeline
 InheritedlayoutXML : XML
The XML descriptor of the sub-layout from this node.
LayoutNode
 InheritedparentNode : LayoutNode
A reference to the parent node of this node.
LayoutNode
  range : TimeRange
Timeline
  styleSheet : Stylesheet
Timeline
 Inherited_timeline : Timeline
A reference to the timeline
LayoutNode
  timelineLayout : Layout
Set the Layout object of the timeline
Timeline
 InheritedtitleComponent : SkinnableContainer
The visual component used to show the title part of the node.
LayoutNode
Public Methods
 MethodDefined By
  
Timeline(xmlLayout:XML = null)
Timeline constructor
Timeline
 Inherited
addChildAndTitle(child:LayoutNode, index:int = -1):void
LayoutNode
  
addTrace(pTrace:Trace, index:int = -1, style:String = null):TraceLineGroup
Create a new Tracelinegroup from a trace and add it to the Timeline
Timeline
  
applyCSS(cssData:String, selector:ISelector = null):void
Timeline
  
applyStylesheetToTraceline(applicator:IApplicator, stylesheet:IStyleSheet, traceline:TraceLine, selector:ISelector = null, parentNames:Array = null):void
Timeline
  
automaticHolemaker(tlg:TraceLineGroup, minSize:Number = 0):int
Automatically create holes for the given TraceLineGroup, for a given minimum hole width.
Timeline
  
filterDisplay(expr:String = null):void
Timeline
  
formatTime(time:Number):String
Return a formatted representation of t (in ms) It takes into account the isRelativeTimeMode of the timeline.
Timeline
  
Get the currently displayed traces
Timeline
 Inherited
Return the layoutNode of a given name in the subtree of this node
LayoutNode
 Inherited
LayoutNode
  
Find and return the first TraceLineGroup whose trace has a given URI ; return null if not found.
Timeline
  
makeTimeHole(startValue:Number, endValue:Number):void
Make a time hole between the startValue and endValue.
Timeline
  
makeTracelineGroupVisible(tlg:TraceLineGroup, fillHole:Boolean = true):void
Ensure that the TraceLineGroup is visible.
Timeline
 Inherited
moveTraceline(child:LayoutNode, index:int = -1):void
LayoutNode
  
moveTraceLineGroup(fromIndex:uint, toIndex:uint):void
Change the position of a TraceLineGroup
Timeline
 Inherited
onSourceChange(event:CollectionEvent):void
LayoutNode
 Inherited
Remove a child (mostly Traceline)
LayoutNode
  
removeTrace(tr:Trace):Boolean
Remove the first Tracelinegroup with a given trace
Timeline
  
Remove a TraceLineGroup
Timeline
 Inherited
resetObselCollection(obselsCollection:ArrayCollection = null):void
LayoutNode
  
Reset the time range limits to the the limits of the loaded traces.
Timeline
  
saveTraceTo(format:String = tsv):void
Save the displayed traces.
Timeline
  
setTimeRangeLimits(startValue:Number, endValue:Number):void
Change the time range limits.
Timeline
  
startActivityTracing(tr:Trace = null):Trace
Start tracing activity.
Timeline
  
styleChanged(styleProp:String):void
[override]
Timeline
Protected Methods
 MethodDefined By
  
partAdded(partName:String, instance:Object):void
[override]
Timeline
Events
 Event Summary Defined By
  This event is dispatched when the current time change (with 'set currentTime').Timeline
  This event is dispatched when the currentTime exceeds the endAlertBeforeTime property milliseconds before the end of the time range of the timeline.Timeline
  This event is dispatched when the currentTime reached (or exceed) the end of the time range of the timeline.Timeline
  This event is dispatched when a traceline is created by a layoutModifier. The 'value' property of the TimelineEvent is an object with 3 properties { generator, obsel, traceline } where: 'generator' is the LayoutModifier, 'traceline' is the created traceline, 'obsel' is the obsel for wich we create a new traceline.Timeline
  This event is dispatched when a layout node is added as child of another.Timeline
  This event is dispatched when the 'pause' button is clicked.Timeline
  This event is dispatched when the 'play' button is clicked.Timeline
  This event is dispatched when one of the two time rulers is clicked.Timeline
Styles
 Style Description Defined By
  
cursorMode
Type: String CSS Inheritance: no
This style changes the zoomContext cursor behavior.

If set to 'follow', the cursor follows the current time and cannot be edited until the 'lock/unlock' button is clicked. If set to 'auto' the cursor follows the current time until it is manually edited. After editing, the 'lock/unlock' button can be toggled to restart following. If set to 'manual' the cursor does not follow the current time and can be freely edited.

The default value is manual.
Timeline
  
showExportButton
Type: Boolean CSS Inheritance: no
Timeline
  
showPlayButton
Type: Boolean CSS Inheritance: no
Timeline
  
showSearchBox
Type: Boolean CSS Inheritance: no
Timeline
  
showTraceLineControls
Type: Boolean CSS Inheritance: no
Timeline
  
showTraceLineGroupControls
Type: Boolean CSS Inheritance: no
Timeline
  
timeMode
Type: String CSS Inheritance: no
if 'relative', the time labels starts from 0 otherwise the time labels display absolute times.
Timeline
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
  
contextCursor:Cursor
Required: true Part Type: Static
The cursor that indicates the current time value in the context part.
Timeline
  
globalCursor:Cursor
Required: true Part Type: Static
The cursor that indicates the current time value in the zoom part.
Timeline
  
titleGroup:spark.components.Group
Required: true Part Type: Static
The container that contains the title part of the TracelineGroups
Timeline
  
zoomContext:ZoomContext
Required: true Part Type: Static

Timeline
Property Detail
activityproperty
public var activity:Trace = null

Activity trace

beginproperty 
begin:Number  [read-only]


Implementation
    public function get begin():Number
contextFollowCursorproperty 
contextFollowCursor:Boolean  [read-only]

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


Implementation
    public function get contextFollowCursor():Boolean
cssStyleSheetCollectionproperty 
public var cssStyleSheetCollection:IStyleSheetCollection

currentTimeproperty 
currentTime:Number

Modify the current time value. It is the only way to change the current value of the timeline and it is never called in the timeline code (it must be changed from outside)


Implementation
    public function get currentTime():Number
    public function set currentTime(value:Number):void
currrentRelativeTimeproperty 
currrentRelativeTime:Number  [read-only]


Implementation
    public function get currrentRelativeTime():Number
dateFormatterproperty 
public var dateFormatter:DateFormatter

debugproperty 
public var debug:Object

durationproperty 
duration:Number  [read-only]


Implementation
    public function get duration():Number
endproperty 
end:Number  [read-only]


Implementation
    public function get end():Number
endAlertBeforeTimeproperty 
public var endAlertBeforeTime:Number = 30000

isPlayingproperty 
isPlaying:Boolean  [read-only]

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


Implementation
    public function get isPlaying():Boolean
isRelativeTimeModeproperty 
isRelativeTimeMode:Boolean  [read-only]


Implementation
    public function get isRelativeTimeMode():Boolean
rangeproperty 
public var range:TimeRange

styleSheetproperty 
styleSheet:Stylesheet


Implementation
    public function get styleSheet():Stylesheet
    public function set styleSheet(value:Stylesheet):void
timelineLayoutproperty 
timelineLayout:Layout

Set the Layout object of the timeline


Implementation
    public function get timelineLayout():Layout
    public function set timelineLayout(value:Layout):void
Constructor Detail
Timeline()Constructor
public function Timeline(xmlLayout:XML = null)

Timeline constructor

Parameters
xmlLayout:XML (default = null) — an xml definition of the timeline layout
Method Detail
addTrace()method
public function addTrace(pTrace:Trace, index:int = -1, style:String = null):TraceLineGroup

Create a new Tracelinegroup from a trace and add it to the Timeline

Parameters

pTrace:Trace — the trace to add
 
index:int (default = -1) — the position of new Tracelinegroup in the Timeline (-1 to add it at the end)
 
style:String (default = null) — the style name of the tracelinegroup to create.

Returns
TraceLineGroup — the TraceLineGroup if the creation succeeded otherwise return null.
applyCSS()method 
public function applyCSS(cssData:String, selector:ISelector = null):void

Parameters

cssData:String
 
selector:ISelector (default = null)

applyStylesheetToTraceline()method 
public function applyStylesheetToTraceline(applicator:IApplicator, stylesheet:IStyleSheet, traceline:TraceLine, selector:ISelector = null, parentNames:Array = null):void

Parameters

applicator:IApplicator
 
stylesheet:IStyleSheet
 
traceline:TraceLine
 
selector:ISelector (default = null)
 
parentNames:Array (default = null)

automaticHolemaker()method 
public function automaticHolemaker(tlg:TraceLineGroup, minSize:Number = 0):int

Automatically create holes for the given TraceLineGroup, for a given minimum hole width.

Parameters

tlg:TraceLineGroup
 
minSize:Number (default = 0)

Returns
int — the number of created holes
filterDisplay()method 
public function filterDisplay(expr:String = null):void

Parameters

expr:String (default = null)

formatTime()method 
public function formatTime(time:Number):String

Return a formatted representation of t (in ms) It takes into account the isRelativeTimeMode of the timeline.

Parameters

time:Number

Returns
String
getCurrentTraces()method 
public function getCurrentTraces():Array

Get the currently displayed traces

Returns
Array
getTraceLineGroupByTraceUri()method 
public function getTraceLineGroupByTraceUri(uri:String):TraceLineGroup

Find and return the first TraceLineGroup whose trace has a given URI ; return null if not found.

Parameters

uri:String — the uri of the trace

Returns
TraceLineGroup — the tracelinegroup if exists. null if not found.
makeTimeHole()method 
public function makeTimeHole(startValue:Number, endValue:Number):void

Make a time hole between the startValue and endValue.

Parameters

startValue:Number — lower limit of the time hole interval
 
endValue:Number — higher limit of the time hole interval

makeTracelineGroupVisible()method 
public function makeTracelineGroupVisible(tlg:TraceLineGroup, fillHole:Boolean = true):void

Ensure that the TraceLineGroup is visible.

Parameters

tlg:TraceLineGroup
 
fillHole:Boolean (default = true)

moveTraceLineGroup()method 
public function moveTraceLineGroup(fromIndex:uint, toIndex:uint):void

Change the position of a TraceLineGroup

Parameters

fromIndex:uint
 
toIndex:uint

partAdded()method 
override protected function partAdded(partName:String, instance:Object):void

Parameters

partName:String
 
instance:Object

removeTrace()method 
public function removeTrace(tr:Trace):Boolean

Remove the first Tracelinegroup with a given trace

Parameters

tr:Trace — the trace of the TraceLineGroup

Returns
Boolean — true if sucess else return false.
removeTraceLineGroup()method 
public function removeTraceLineGroup(tlg:TraceLineGroup):void

Remove a TraceLineGroup

Parameters

tlg:TraceLineGroup — the TraceLineGroup to remove.

resetTimeRangeLimits()method 
public function resetTimeRangeLimits():void

Reset the time range limits to the the limits of the loaded traces.

saveTraceTo()method 
public function saveTraceTo(format:String = tsv):void

Save the displayed traces.

Parameters

format:String (default = tsv)

setTimeRangeLimits()method 
public function setTimeRangeLimits(startValue:Number, endValue:Number):void

Change the time range limits. It's used to make a zoom for example. By default, the range limits are the limits of the loaded traces.

Parameters

startValue:Number
 
endValue:Number

startActivityTracing()method 
public function startActivityTracing(tr:Trace = null):Trace

Start tracing activity. If a Trace is passed as parameter, it will be used to store the activity trace, even if another trace was already defined. Else, a new, empty trace will be created.

Parameters

tr:Trace (default = null)

Returns
Trace — The activity trace
styleChanged()method 
override public function styleChanged(styleProp:String):void

Parameters

styleProp:String

Event Detail
currentTimeChange Event
Event Object Type: com.ithaca.timeline.events.TimelineEvent

This event is dispatched when the current time change (with 'set currentTime'). The current time of the timeline never changes internaly, it must be changed by the setter of currentTime.

endAlert Event  
Event Object Type: com.ithaca.timeline.events.TimelineEvent

This event is dispatched when the currentTime exceeds the endAlertBeforeTime property milliseconds before the end of the time range of the timeline.

endReached Event  
Event Object Type: com.ithaca.timeline.events.TimelineEvent

This event is dispatched when the currentTime reached (or exceed) the end of the time range of the timeline.

generateNewTraceline Event  
Event Object Type: com.ithaca.timeline.events.TimelineEvent

This event is dispatched when a traceline is created by a layoutModifier. The 'value' property of the TimelineEvent is an object with 3 properties { generator, obsel, traceline } where: 'generator' is the LayoutModifier, 'traceline' is the created traceline, 'obsel' is the obsel for wich we create a new traceline.

layoutNodeAdded Event  
Event Object Type: com.ithaca.timeline.events.TimelineEvent

This event is dispatched when a layout node is added as child of another. The 'value' property of the TimelineEvent is this LayoutNode.

pauseButtonClick Event  
Event Object Type: com.ithaca.timeline.events.TimelineEvent

This event is dispatched when the 'pause' button is clicked.

playButtonClick Event  
Event Object Type: com.ithaca.timeline.events.TimelineEvent

This event is dispatched when the 'play' button is clicked.

timeRulerClick Event  
Event Object Type: com.ithaca.timeline.events.TimelineEvent

This event is dispatched when one of the two time rulers is clicked. It is mostly used to indicate that the user wants to change the currentTime. The 'value' property of the TimelineEvent is the time in milliseconds.