edu.cmu.hcii.calo.view.schedule.BlockScheduleView Class Reference

Inherits edu.cmu.hcii.calo.view.AnimatedPane.

Inheritance diagram for edu.cmu.hcii.calo.view.schedule.BlockScheduleView:

Inheritance graph
[legend]
Collaboration diagram for edu.cmu.hcii.calo.view.schedule.BlockScheduleView:

Collaboration graph
[legend]
List of all members.

Detailed Description

A view that displays schedule events in block (as opposed to agenda) view.

Author:
Brian Ellis


Public Member Functions

 BlockScheduleView ()
 Constructs a BlockScheduleView.
void doNotAnimateNextUpdate ()
 Tells the pane not to perform animations the next time update() is called.
void setBounds (int x, int y, int width, int height)
 
See also:
java.awt.Component.setBounds(int, int, int, int)

void setBounds (Rectangle r)
 
See also:
java.awt.Component.setBounds(java.awt.Rectangle)

void zoomIn ()
 Zooms the view in one unit.
void zoomOut ()
 Zooms the view out one unit.

Protected Member Functions

boolean doAnimations ()
 
See also:
edu.cmu.hcii.calo.view.AnimatedPane.doAnimations()

void doUpdate ()
 
See also:
edu.cmu.hcii.calo.view.AnimatedPane.doUpdate()

void paintComponent (Graphics graphics)
 
See also:
edu.cmu.hcii.calo.view.TranslucentView.paintComponent(java.awt.Graphics)

void prepareAnimations ()
 Should be implemented to record the positions of all the components in the view so they can be animated to their new positions later.
void safeUpdateAnimation (Animation a)
 Should be implemented to process an updated animation, just like AnimationListener.animationDidUpdate(Animation).

Private Member Functions

Rectangle getScheduleItemBounds (ScheduleItemView view)
 Gets the desired bounds of the given schedule item view based on the current time.

Static Private Member Functions

static boolean scheduleItemIsVisible (ScheduleItem item)
 Returns true if the schedule item is within the range in which it should be visible on the schedule, false otherwise.

Private Attributes

float currentZoom = BlockScheduleView.DEFAULT_ZOOM_PPH
 The current zoom level in pixels per hour.
Map< ScheduleItem, ScheduleItemViewviews
 The mapping between the schedule items and the views that show them.
Map< ScheduleItemView, Rectangle > bounds = new HashMap<ScheduleItemView, Rectangle>()
 The mapping between the schedule item views and their bounds rectangles.
boolean skipAnimations
 Whether or not we should skip animations on the next update.

Static Private Attributes

static final long serialVersionUID = -4970443534285020287L
 Prevent serialization collisions.
static final float DEFAULT_ZOOM_PPH = 35.0f
 The default zoom level, expressed in pixels per hour.
static final float ZOOM_INCREMENT = 1.5f
 The zoom increment multiplier.


Constructor & Destructor Documentation

edu.cmu.hcii.calo.view.schedule.BlockScheduleView.BlockScheduleView (  ) 

Constructs a BlockScheduleView.


Member Function Documentation

static boolean edu.cmu.hcii.calo.view.schedule.BlockScheduleView.scheduleItemIsVisible ( ScheduleItem  item  )  [static, private]

Returns true if the schedule item is within the range in which it should be visible on the schedule, false otherwise.

Parameters:
item the item to check
Returns:
true if the item should be visible, false otherwise

boolean edu.cmu.hcii.calo.view.schedule.BlockScheduleView.doAnimations (  )  [protected, virtual]

See also:
edu.cmu.hcii.calo.view.AnimatedPane.doAnimations()

Implements edu.cmu.hcii.calo.view.AnimatedPane.

void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.doNotAnimateNextUpdate (  ) 

Tells the pane not to perform animations the next time update() is called.

void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.doUpdate (  )  [protected, virtual]

See also:
edu.cmu.hcii.calo.view.AnimatedPane.doUpdate()

Implements edu.cmu.hcii.calo.view.AnimatedPane.

Rectangle edu.cmu.hcii.calo.view.schedule.BlockScheduleView.getScheduleItemBounds ( ScheduleItemView  view  )  [private]

Gets the desired bounds of the given schedule item view based on the current time.

Parameters:
view the view to ask about bounds for
Returns:
the desired bounds for the view

void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.paintComponent ( Graphics  graphics  )  [protected]

See also:
edu.cmu.hcii.calo.view.TranslucentView.paintComponent(java.awt.Graphics)

Reimplemented from edu.cmu.hcii.calo.view.TranslucentView.

void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.prepareAnimations (  )  [protected, virtual]

Should be implemented to record the positions of all the components in the view so they can be animated to their new positions later.

prepareAnimations() is called from update() before doUpdate() is invoked, so the component positions are unchanged from what they were before the update.

Implements edu.cmu.hcii.calo.view.AnimatedPane.

void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.safeUpdateAnimation ( Animation  a  )  [protected, virtual]

Should be implemented to process an updated animation, just like AnimationListener.animationDidUpdate(Animation).

This method exists because AnimatedPane performs some automatic setup and teardown in animationDidUpdate(Animation), and calls safeUpdateAnimation(Animation) in between.

Parameters:
a the animation that is updating

Implements edu.cmu.hcii.calo.view.AnimatedPane.

void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.setBounds ( int  x,
int  y,
int  width,
int  height 
)

See also:
java.awt.Component.setBounds(int, int, int, int)

void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.setBounds ( Rectangle  r  ) 

See also:
java.awt.Component.setBounds(java.awt.Rectangle)

void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.zoomIn (  ) 

Zooms the view in one unit.

void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.zoomOut (  ) 

Zooms the view out one unit.


Member Data Documentation

final long edu.cmu.hcii.calo.view.schedule.BlockScheduleView.serialVersionUID = -4970443534285020287L [static, private]

Prevent serialization collisions.

Reimplemented from edu.cmu.hcii.calo.view.CALOComponent.

final float edu.cmu.hcii.calo.view.schedule.BlockScheduleView.DEFAULT_ZOOM_PPH = 35.0f [static, private]

The default zoom level, expressed in pixels per hour.

final float edu.cmu.hcii.calo.view.schedule.BlockScheduleView.ZOOM_INCREMENT = 1.5f [static, private]

The zoom increment multiplier.

When the user zooms in, multiply the PPH by this amount. When the user zooms out, divide by this amount.

float edu.cmu.hcii.calo.view.schedule.BlockScheduleView.currentZoom = BlockScheduleView.DEFAULT_ZOOM_PPH [private]

The current zoom level in pixels per hour.

Map<ScheduleItem, ScheduleItemView> edu.cmu.hcii.calo.view.schedule.BlockScheduleView.views [private]

Initial value:

        new HashMap<ScheduleItem, ScheduleItemView>()
The mapping between the schedule items and the views that show them.

Map<ScheduleItemView, Rectangle> edu.cmu.hcii.calo.view.schedule.BlockScheduleView.bounds = new HashMap<ScheduleItemView, Rectangle>() [private]

The mapping between the schedule item views and their bounds rectangles.

boolean edu.cmu.hcii.calo.view.schedule.BlockScheduleView.skipAnimations [private]

Whether or not we should skip animations on the next update.


The documentation for this class was generated from the following file:
Generated on Mon Aug 13 15:06:26 2007 for CALO by  doxygen 1.5.2