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

Inherits edu.cmu.hcii.calo.view.CALOComponent.

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

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

Collaboration graph
[legend]
List of all members.

Detailed Description

A view class that displays a single notification.

Author:
Will Haines


Public Member Functions

 NotificationGroupView (NotificationGroupView ngv, NotificationCenterView notificationCenter)
 Copy constructor; sets the default to be not mini.
 NotificationGroupView (NotificationType type, boolean isMini, boolean isImportant, NotificationCenterView notificationCenter)
 Constructs a NotificationGroupView.
void addNotification (Notification notification)
 Add a notification to this notification group.
boolean containsNotification (Notification notification)
 Tests to see if this notification group contains a given notification.
long getAddTime ()
 A getter for the add time of this notification.
List< NotificationgetNotifications ()
 Returns the notifications associated with this view.
NotificationGroupTitleView getTitle ()
 A getter for title.
boolean isImportantColorSet ()
 A getter for isImportantColorSet.
void removeNotification (Notification notification)
 Remove a notification from this group.
void setAddTime (long addTime)
 A setter for add time.
void setColor (double[] currentValues)
 Sets the color of this notification group to make it flash.
void setImportantColorToggle (boolean isImportantColorSet)
 A setter for isImportantColorSet.
void setSize (Dimension d)
 
See also:
java.awt.Component.setSize(java.awt.Dimension)

String toString ()
 
See also:
java.awt.Component.toString()


Static Public Member Functions

static void main (String[] args)
 Runs a small test program to verify that NotificationGroupView works correctly.

Protected Member Functions

NotificationType getNotificationGroupType ()
 A getter for notificationGroupType.
double getPriority ()
 A getter for priority.
boolean isExpanded ()
 A getter for the title's state of expansion.
void setExpanded (boolean isExpanded)
 A setter for isExpanded.
void update ()
 Causes this group to update its state based on the NotificationManager's model state.

Private Member Functions

void setup ()
 Sets up the appearance of the NotificationGroupView.

Private Attributes

List< Notificationnotifications
 The notifications being represented by this group view.
NotificationType notificationGroupType
 The notification types in this group view.
NotificationGroupTitleView title
 The title view of this notification group.
double priority
 This notification group's priority.
long addTime
 This notification group's id to break ties consistently.

Static Private Attributes

static final long serialVersionUID = -8336327906817748848L
 Prevent serialization collisions.


Constructor & Destructor Documentation

edu.cmu.hcii.calo.view.notification.NotificationGroupView.NotificationGroupView ( NotificationGroupView  ngv,
NotificationCenterView  notificationCenter 
)

Copy constructor; sets the default to be not mini.

Parameters:
ngv the old notification group view
notificationCenter the notification center

edu.cmu.hcii.calo.view.notification.NotificationGroupView.NotificationGroupView ( NotificationType  type,
boolean  isMini,
boolean  isImportant,
NotificationCenterView  notificationCenter 
)

Constructs a NotificationGroupView.


Member Function Documentation

static void edu.cmu.hcii.calo.view.notification.NotificationGroupView.main ( String[]  args  )  [static]

Runs a small test program to verify that NotificationGroupView works correctly.

Parameters:
args command-line args; don't bother passing any

void edu.cmu.hcii.calo.view.notification.NotificationGroupView.addNotification ( Notification  notification  ) 

Add a notification to this notification group.

Update it's text to reflect what is going on.

Parameters:
notification 

boolean edu.cmu.hcii.calo.view.notification.NotificationGroupView.containsNotification ( Notification  notification  ) 

Tests to see if this notification group contains a given notification.

Parameters:
notification the notification to search for
Returns:
true if the group contains this notification, false otherwise

long edu.cmu.hcii.calo.view.notification.NotificationGroupView.getAddTime (  ) 

A getter for the add time of this notification.

Returns:
addTime

NotificationType edu.cmu.hcii.calo.view.notification.NotificationGroupView.getNotificationGroupType (  )  [protected]

A getter for notificationGroupType.

Returns:
the notificationGroupType

List<Notification> edu.cmu.hcii.calo.view.notification.NotificationGroupView.getNotifications (  ) 

Returns the notifications associated with this view.

double edu.cmu.hcii.calo.view.notification.NotificationGroupView.getPriority (  )  [protected]

A getter for priority.

Returns:
the priority

NotificationGroupTitleView edu.cmu.hcii.calo.view.notification.NotificationGroupView.getTitle (  ) 

A getter for title.

Returns:
the title

boolean edu.cmu.hcii.calo.view.notification.NotificationGroupView.isExpanded (  )  [protected]

A getter for the title's state of expansion.

Returns:
true if expanded, false otherwise

boolean edu.cmu.hcii.calo.view.notification.NotificationGroupView.isImportantColorSet (  ) 

A getter for isImportantColorSet.

Returns:
if the important color is set

void edu.cmu.hcii.calo.view.notification.NotificationGroupView.removeNotification ( Notification  notification  ) 

Remove a notification from this group.

Parameters:
notification the notification to remove

void edu.cmu.hcii.calo.view.notification.NotificationGroupView.setAddTime ( long  addTime  ) 

A setter for add time.

Parameters:
addTime the add time to change to

void edu.cmu.hcii.calo.view.notification.NotificationGroupView.setColor ( double[]  currentValues  ) 

Sets the color of this notification group to make it flash.

Parameters:
currentValues the RGB values for this color

void edu.cmu.hcii.calo.view.notification.NotificationGroupView.setExpanded ( boolean  isExpanded  )  [protected]

A setter for isExpanded.

Parameters:
isExpanded the value to update to

void edu.cmu.hcii.calo.view.notification.NotificationGroupView.setImportantColorToggle ( boolean  isImportantColorSet  ) 

A setter for isImportantColorSet.

Parameters:
isImportantColorSet the value to set

void edu.cmu.hcii.calo.view.notification.NotificationGroupView.setSize ( Dimension  d  ) 

See also:
java.awt.Component.setSize(java.awt.Dimension)

void edu.cmu.hcii.calo.view.notification.NotificationGroupView.setup (  )  [private]

Sets up the appearance of the NotificationGroupView.

String edu.cmu.hcii.calo.view.notification.NotificationGroupView.toString (  ) 

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

void edu.cmu.hcii.calo.view.notification.NotificationGroupView.update (  )  [protected]

Causes this group to update its state based on the NotificationManager's model state.


Member Data Documentation

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

Prevent serialization collisions.

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

List<Notification> edu.cmu.hcii.calo.view.notification.NotificationGroupView.notifications [private]

The notifications being represented by this group view.

NotificationType edu.cmu.hcii.calo.view.notification.NotificationGroupView.notificationGroupType [private]

The notification types in this group view.

NotificationGroupTitleView edu.cmu.hcii.calo.view.notification.NotificationGroupView.title [private]

The title view of this notification group.

double edu.cmu.hcii.calo.view.notification.NotificationGroupView.priority [private]

This notification group's priority.

This is defined as the maximum of all its children's priorities.

long edu.cmu.hcii.calo.view.notification.NotificationGroupView.addTime [private]

This notification group's id to break ties consistently.


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