edu.cmu.hcii.calo.view.notification.NotificationCenterView Class Reference

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

Inheritance diagram for edu.cmu.hcii.calo.view.notification.NotificationCenterView:

Inheritance graph
[legend]
Collaboration diagram for edu.cmu.hcii.calo.view.notification.NotificationCenterView:

Collaboration graph
[legend]
List of all members.

Detailed Description

The visualization of the notification center pane.

Todo:
Set the priority cutoff through the controller and engine.
Author:
Will Haines


Public Member Functions

 NotificationCenterView (boolean isMini)
 Create a new NotificationCenterView.
void closeNotificationGroupOutsideSidebar ()
 Close the outside window.
Dimension getPreferredSize ()
 Returns the preferred size of the notification center, which is its normal size unless it reaches a minimum size, at which point it won't shrink any more.
void hideNotificationGroupOutsideSidebar ()
 Hide the outside window.
boolean isMini ()
 A getter for isMini.
boolean isValid ()
 
See also:
java.awt.Component.isValid()

void setMini (boolean isMini)
 Set the notification center to be mini or not.
void showNotificationGroupOutsideSidebar (NotificationGroupView ngv)
 Shows this notification group expanded and outside of the sidebar for the mini bar view.

Static Public Attributes

static final double DEFAULT_PRIORITY_CUTOFF = 100.0
 The point at which notifications get their own group.

Protected Member Functions

boolean doAnimations ()
 (non-Javadoc)
void doUpdate ()
 Updates the look of this view by dividing up the notification list from the manager into important single-item notification groups, then coalescing the rest into type-based groups.
void finalizeAnimation ()
 
See also:
edu.cmu.hcii.calo.view.AnimatedPane.finalizeAnimation()

void paintComponent (Graphics arg0)
 Make the notification center pretty with a gradient and roundedness.
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 Attributes

double priorityCutoff
 The cutoff for notification coalescing.
Map< Notification, NotificationGroupViewoldViewState
 The old view for purposes of storing animation start locations.
ArrayList< NotificationoldNotificationOrder
 The old order of notifications as viewed here.
ArrayList< NotificationGroupViewtoRemove
 The views to remove from upon update.
List< NotificationGroupViewsortedLayout
 The new views to be added sorted.
boolean isMini
 This view is minimized.
JDialog outsideView
 The view to show off the sidebar.
NotificationGroupView outsideGroup
 The notification group to show off the sidebar.
NotificationGroupView outsideReference
 The mini group view referenced by the outside sidebar group.
NotificationGroupView newReference
 The next mini group to reference by outside the sidebar group.
boolean dontAnimate
 Supress animations.

Static Private Attributes

static final int DEFAULT_MINIMUM_SIZE = 24 * 3
 The minimum size of the notification center in pixels.
static final long serialVersionUID = -4027022402433141088L
 Prevent serialization collisions.
static final double ANIMATION_DURATION = .75
 How long animations should take to complete.
static final double PULSE_DURATION = 2.0
 How long an animation pulse should take to complete.
static final double GROWL_DURATION = 5.0
 How long a growl stays on screen.


Constructor & Destructor Documentation

edu.cmu.hcii.calo.view.notification.NotificationCenterView.NotificationCenterView ( boolean  isMini  ) 

Create a new NotificationCenterView.


Member Function Documentation

void edu.cmu.hcii.calo.view.notification.NotificationCenterView.closeNotificationGroupOutsideSidebar (  ) 

Close the outside window.

boolean edu.cmu.hcii.calo.view.notification.NotificationCenterView.doAnimations (  )  [protected, virtual]

(non-Javadoc)

See also:
edu.cmu.hcii.calo.view.AnimatedPane.doAnimations()
Todo:
Make breaking out of a notification group to high priority work
Todo:
Make intra-group animations work

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

void edu.cmu.hcii.calo.view.notification.NotificationCenterView.doUpdate (  )  [protected, virtual]

Updates the look of this view by dividing up the notification list from the manager into important single-item notification groups, then coalescing the rest into type-based groups.

Todo:
Store the expanded state correctly.
See also:
edu.cmu.hcii.calo.view.AnimatedPane.doUpdate()

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

void edu.cmu.hcii.calo.view.notification.NotificationCenterView.finalizeAnimation (  )  [protected]

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

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

Dimension edu.cmu.hcii.calo.view.notification.NotificationCenterView.getPreferredSize (  ) 

Returns the preferred size of the notification center, which is its normal size unless it reaches a minimum size, at which point it won't shrink any more.

See also:
javax.swing.JComponent.getPreferredSize()

void edu.cmu.hcii.calo.view.notification.NotificationCenterView.hideNotificationGroupOutsideSidebar (  ) 

Hide the outside window.

boolean edu.cmu.hcii.calo.view.notification.NotificationCenterView.isMini (  ) 

A getter for isMini.

Returns:
isMini

boolean edu.cmu.hcii.calo.view.notification.NotificationCenterView.isValid (  ) 

See also:
java.awt.Component.isValid()

void edu.cmu.hcii.calo.view.notification.NotificationCenterView.paintComponent ( Graphics  arg0  )  [protected]

Make the notification center pretty with a gradient and roundedness.

Parameters:
arg0 the graphics context to paint with
See also:
javax.swing.JComponent.paintComponent(java.awt.Graphics)

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

void edu.cmu.hcii.calo.view.notification.NotificationCenterView.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.notification.NotificationCenterView.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.notification.NotificationCenterView.setMini ( boolean  isMini  ) 

Set the notification center to be mini or not.

Parameters:
isMini whether or not this notification is a mini one

void edu.cmu.hcii.calo.view.notification.NotificationCenterView.showNotificationGroupOutsideSidebar ( NotificationGroupView  ngv  ) 

Shows this notification group expanded and outside of the sidebar for the mini bar view.

Parameters:
ngv the notification group view to show.


Member Data Documentation

final int edu.cmu.hcii.calo.view.notification.NotificationCenterView.DEFAULT_MINIMUM_SIZE = 24 * 3 [static, private]

The minimum size of the notification center in pixels.

Right now there is space for three notifications.

final double edu.cmu.hcii.calo.view.notification.NotificationCenterView.DEFAULT_PRIORITY_CUTOFF = 100.0 [static]

The point at which notifications get their own group.

final long edu.cmu.hcii.calo.view.notification.NotificationCenterView.serialVersionUID = -4027022402433141088L [static, private]

Prevent serialization collisions.

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

final double edu.cmu.hcii.calo.view.notification.NotificationCenterView.ANIMATION_DURATION = .75 [static, private]

How long animations should take to complete.

final double edu.cmu.hcii.calo.view.notification.NotificationCenterView.PULSE_DURATION = 2.0 [static, private]

How long an animation pulse should take to complete.

final double edu.cmu.hcii.calo.view.notification.NotificationCenterView.GROWL_DURATION = 5.0 [static, private]

How long a growl stays on screen.

double edu.cmu.hcii.calo.view.notification.NotificationCenterView.priorityCutoff [private]

The cutoff for notification coalescing.

Map<Notification, NotificationGroupView> edu.cmu.hcii.calo.view.notification.NotificationCenterView.oldViewState [private]

The old view for purposes of storing animation start locations.

ArrayList<Notification> edu.cmu.hcii.calo.view.notification.NotificationCenterView.oldNotificationOrder [private]

The old order of notifications as viewed here.

ArrayList<NotificationGroupView> edu.cmu.hcii.calo.view.notification.NotificationCenterView.toRemove [private]

The views to remove from upon update.

List<NotificationGroupView> edu.cmu.hcii.calo.view.notification.NotificationCenterView.sortedLayout [private]

The new views to be added sorted.

boolean edu.cmu.hcii.calo.view.notification.NotificationCenterView.isMini [private]

This view is minimized.

JDialog edu.cmu.hcii.calo.view.notification.NotificationCenterView.outsideView [private]

The view to show off the sidebar.

NotificationGroupView edu.cmu.hcii.calo.view.notification.NotificationCenterView.outsideGroup [private]

The notification group to show off the sidebar.

NotificationGroupView edu.cmu.hcii.calo.view.notification.NotificationCenterView.outsideReference [private]

The mini group view referenced by the outside sidebar group.

NotificationGroupView edu.cmu.hcii.calo.view.notification.NotificationCenterView.newReference [private]

The next mini group to reference by outside the sidebar group.

boolean edu.cmu.hcii.calo.view.notification.NotificationCenterView.dontAnimate [private]

Supress animations.


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