Packagecom.ithaca.timeline
Classpublic class TimeRuler
InheritanceTimeRuler Inheritance spark.components.Group
Implements mx.binding.IBindingClient

This component displays a TimeRange as a ruler with equidistant time markers and time labels. There are two TimeRulers in the ZoomContext component: one for the whole TimeRange of the timeline (context), and the other for the selected TimeRange (zoom).

Default MXML PropertymxmlContent



Public Properties
 PropertyDefined By
  backgroundColor : Number = 0xF5F5F5
TimeRuler
  labelsIntervals : Array
TimeRuler
  labelsOnTop : Boolean = false
TimeRuler
  limitMarkHeight : Number = 10
TimeRuler
  majorIntervals : Array
TimeRuler
  majorMarkHeight : Number = 7
TimeRuler
  maxLabelsGap : Number = 30
TimeRuler
  maxMarksGap : Number = 20
TimeRuler
  minLabelsGap : Number = 80
TimeRuler
  minMarksGap : Number = 4
TimeRuler
  minorMarkHeight : Number = 4
TimeRuler
  ruler : SpriteVisualElement
TimeRuler
  rulerWidth : Number = 100
TimeRuler
  startPosition : Number = 0
TimeRuler
  timeLabels : Group
TimeRuler
  timeline : Timeline
TimeRuler
  timeRange : TimeRange
TimeRuler
  TimeRulerContainer : BorderContainer
TimeRuler
  tt : TimeToolTip
TimeRuler
  validIntervals : Array
TimeRuler
Public Methods
 MethodDefined By
  
Constructor.
TimeRuler
  
TimeRuler
  
onClick(event:MouseEvent):void
Handles a click on the ruler to dispatch an TimelineEvent.TIMERULER_CLICK event with the clicked time
TimeRuler
  
TimeRuler
  
redraw(event:ResizeEvent = null):void
TimeRuler
Protected Methods
 MethodDefined By
  
TimeRuler
  
onToolTipShow(event:MouseEvent):void
TimeRuler
Styles
 Style Description Defined By
  
backgroundColor
Type: Number Format: Color CSS Inheritance: no
TimeRuler
  
labelsIntervals
Type: Array CSS Inheritance: no
TimeRuler
  
limitMarkHeight
Type: Array CSS Inheritance: no
TimeRuler
  
majorMarkHeight
Type: Array CSS Inheritance: no
TimeRuler
  
maxLabelsGap
Type: Array CSS Inheritance: no
TimeRuler
  
maxMarksGap
Type: Array CSS Inheritance: no
TimeRuler
  
minLabelsGap
Type: Number CSS Inheritance: no
TimeRuler
  
minMarksGap
Type: Array CSS Inheritance: no
TimeRuler
  
minorMarkHeight
Type: Array CSS Inheritance: no
TimeRuler
  
validIntervals
Type: Array CSS Inheritance: no
TimeRuler
Property Detail
backgroundColorproperty
public var backgroundColor:Number = 0xF5F5F5

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

labelsIntervalsproperty 
public var labelsIntervals:Array

labelsOnTopproperty 
public var labelsOnTop:Boolean = false

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

limitMarkHeightproperty 
public var limitMarkHeight:Number = 10

majorIntervalsproperty 
public var majorIntervals:Array

majorMarkHeightproperty 
public var majorMarkHeight:Number = 7

maxLabelsGapproperty 
public var maxLabelsGap:Number = 30

maxMarksGapproperty 
public var maxMarksGap:Number = 20

minLabelsGapproperty 
public var minLabelsGap:Number = 80

minMarksGapproperty 
public var minMarksGap:Number = 4

minorMarkHeightproperty 
public var minorMarkHeight:Number = 4

rulerproperty 
public var ruler:SpriteVisualElement

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

rulerWidthproperty 
public var rulerWidth:Number = 100

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

startPositionproperty 
public var startPosition:Number = 0

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

timeLabelsproperty 
public var timeLabels:Group

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

timelineproperty 
public var timeline:Timeline

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

timeRangeproperty 
public var timeRange:TimeRange

TimeRulerContainerproperty 
public var TimeRulerContainer:BorderContainer

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

ttproperty 
public var tt:TimeToolTip

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

validIntervalsproperty 
public var validIntervals:Array

Constructor Detail
TimeRuler()Constructor
public function TimeRuler()

Constructor.

Method Detail
changeRange()method
public function changeRange(tr:TimeRange):void

Parameters

tr:TimeRange

creationCompleteHandler()method 
protected function creationCompleteHandler():void

onClick()method 
public function onClick(event:MouseEvent):void

Handles a click on the ruler to dispatch an TimelineEvent.TIMERULER_CLICK event with the clicked time

Parameters

event:MouseEvent

onTimeRangeChange()method 
public function onTimeRangeChange(e:TimelineEvent):void

Parameters

e:TimelineEvent

onToolTipShow()method 
protected function onToolTipShow(event:MouseEvent):void

Parameters

event:MouseEvent

redraw()method 
public function redraw(event:ResizeEvent = null):void

Parameters

event:ResizeEvent (default = null)