Packagecom.ithaca.timeline
Classpublic class BaseObselsRenderer
InheritanceBaseObselsRenderer Inheritance spark.components.Group
Subclasses ObselsRenderer, SimpleObselsRenderer

The BaseObselsRenderer is the base class of ObselRenderers. It is contained by Traceline in both the tree structure and the zoomContext as preview. Common properties are defined and it handles listeners and callbacks to redraw the obsels when needed.

There are two main instances of this class: SimpleObselsRenderer that draws obsels from scratch and ObselsRenderer which uses skins to render the obsels.

It should be an abstract class. The redraw function must be overridden.

Default MXML PropertymxmlContent

See also

SimpleObselsRenderer
ObselsRenderer


Public Properties
 PropertyDefined By
  borderVisible : Boolean = true
Specifies if the borders of the obselsRenderer should be visible or not.
BaseObselsRenderer
  obselsCollection : ArrayCollection
[write-only] Change the obsels collection that is displayed by the obsels renderer.
BaseObselsRenderer
Protected Properties
 PropertyDefined By
  _obsels : ArrayCollection = null
the obsels collection displayed by this component
BaseObselsRenderer
  _timeline : Timeline
Reference to the Timeline
BaseObselsRenderer
  _timeRange : TimeRange = null
Reference to the TimeRange.
BaseObselsRenderer
  _traceline : TraceLine
Reference to the TraceLine that contains the BaseObselsRenderer
BaseObselsRenderer
Public Methods
 MethodDefined By
  
Constructor
BaseObselsRenderer
  
filterDisplay(selector:ISelector = null):void
Filter the display of Obsels.
BaseObselsRenderer
  
onObselsCollectionChange(event:CollectionEvent):void
The callback used when the TimeRange dispatches a CollectionEvent.COLLECTION_CHANGE event.
BaseObselsRenderer
  
onResize(event:ResizeEvent):void
The callback used when the component dispatches a ResizeEvent.RESIZE event.
BaseObselsRenderer
  
The callback used when the TimeRange dispatch a TimelineEvent.TIMERANGES_CHANGE or TimelineEvent.TIMERANGES_SHIFT event.
BaseObselsRenderer
  
redraw(event:Event = null):void
MUST BE OVERRIDDEN.
BaseObselsRenderer
Property Detail
_obselsproperty
protected var _obsels:ArrayCollection = null

the obsels collection displayed by this component

_timelineproperty 
protected var _timeline:Timeline

Reference to the Timeline

_timeRangeproperty 
protected var _timeRange:TimeRange = null

Reference to the TimeRange. There are two main possibilities: if the obselRenderer is in the tree structure the timeRange is the zoomContext.contextRange; otherwise the obselRenderer is in the preview zone and the timeRange is the zoomContext.timelineRange

_tracelineproperty 
protected var _traceline:TraceLine

Reference to the TraceLine that contains the BaseObselsRenderer

borderVisibleproperty 
public var borderVisible:Boolean = true

Specifies if the borders of the obselsRenderer should be visible or not.

obselsCollectionproperty 
obselsCollection:ArrayCollection  [write-only]

Change the obsels collection that is displayed by the obsels renderer.


Implementation
    public function set obselsCollection(value:ArrayCollection):void
Constructor Detail
BaseObselsRenderer()Constructor
public function BaseObselsRenderer(tr:TimeRange, traceLine:TraceLine, timeline:Timeline)

Constructor

Parameters
tr:TimeRange — The associated TimeRange
 
traceLine:TraceLine — the TraceLine that contains the BaseObselsRenderer
 
timeline:Timeline — the Timeline
Method Detail
filterDisplay()method
public function filterDisplay(selector:ISelector = null):void

Filter the display of Obsels. Actually, it is used only in SimpleObselsRenderer since the display filtering method modifies the Obsel skins in standard ObselsRenderer.

Parameters

selector:ISelector (default = null)

onObselsCollectionChange()method 
public function onObselsCollectionChange(event:CollectionEvent):void

The callback used when the TimeRange dispatches a CollectionEvent.COLLECTION_CHANGE event. Should be overridden to optimise rendering.

Parameters

event:CollectionEvent

onResize()method 
public function onResize(event:ResizeEvent):void

The callback used when the component dispatches a ResizeEvent.RESIZE event. Should be overridden to optimise rendering.

Parameters

event:ResizeEvent

onTimerangeChange()method 
public function onTimerangeChange(event:TimelineEvent):void

The callback used when the TimeRange dispatch a TimelineEvent.TIMERANGES_CHANGE or TimelineEvent.TIMERANGES_SHIFT event. Should be overridden to optimise rendering.

Parameters

event:TimelineEvent

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

MUST BE OVERRIDDEN. Should do a full render process but do nothing in this base class.

By Default, this function is called by all the callbacks defined in this class and called when an event that requires redrawing is dispatched. To optimise the rendering, different functions should exist to handle the different events.

Parameters

event:Event (default = null)