Yahoo! UI Library

Diary widget  1.4

Yahoo! UI Library > diary > DiaryBlock
Search:
 
Filters

Class DiaryBlock

A block of diary items. Holds diary items that overlap in time within a single day. You won't want to deal with these directly.

Properties

_endSecs - protected Int

Time, in seconds, of the end of this block.
Default Value: -1

_items - protected Array

Array of DiaryItem in this block.
Default Value: []

_lines - protected Array

The number of vertical lines in the block. Array holding an objects for each line, of the form { startSecs: 123, endSecs: 456 , visible: true }
Default Value: []

_startSecs - protected Int

Time of day, in seconds of the start of this block.
Default Value: 86401

Methods

_findLineForItem

protected Int} || {False _findLineForItem ( )
Will the item fit in an existing vertical line?
Returns: Int} || {False
- line number

addItem

void addItem ( item )
Adds a DiaryItem to the block.
Parameters:
item <DiaryItem>
Returns: void

contains

Boolean contains ( item )
Does item overlap with this block?
Parameters:
item <DiaryItem>
Returns: Boolean

destroy

void destroy ( )
Returns: void

getOffset

void getOffset ( )
Gives the number of visible lines across the line passed is
Returns: void

init

protected void init ( )
Initializer function.
Returns: void

removeItem

Boolean removeItem ( DiaryItem )
Removes an item from the block
Parameters:
DiaryItem <DiaryItem> to remove
Returns: Boolean
True if removed, false if not found

render

Boolean render ( Object )
Renders the DiaryItems in the block
Parameters:
Object <object> Literal containing width property of entire column
Returns: Boolean

toString

String toString ( )
Returns: String


Copyright © 2010 Yahoo! Inc. All rights reserved.