Inheritance diagram for edu.cmu.hcii.calo.view.notification.NotificationView:
Public Member Functions | |
NotificationView (Notification n) | |
Constructs a NotificationView. | |
Notification | getNotification () |
Returns the Notification associated with this view. | |
void | mouseClicked (MouseEvent e) |
Defines the behavior of a mouse click on a notification; that is, nothing happens. | |
void | mouseDragged (MouseEvent e) |
Defines the behavior of a mouse drag on this notification view; that is, nothing happens. | |
void | mouseEntered (MouseEvent e) |
Updates the mouse over state of this notification view. | |
void | mouseExited (MouseEvent e) |
Updates the mouse over state of this notification view. | |
void | mouseMoved (MouseEvent e) |
Defines the behavior of a mouse motion in the notification view; that is, nothing happens. | |
void | mousePressed (MouseEvent e) |
Updates the pressed state of this notification view. | |
void | mouseReleased (MouseEvent e) |
Updates the pressed state of this notification view. | |
String | toString () |
Returns a string representation of this NotificationView. | |
void | update () |
Causes the view to synchronize itself with the Notification model. | |
Dimension | getPreferredSize () |
| |
Static Public Member Functions | |
static void | main (String[] args) |
Runs a small test program to verify that NotificationView works correctly. | |
Protected Attributes | |
Notification | notification |
The notification being represented by this view. | |
Private Member Functions | |
void | setup () |
Sets up the appearance of the NotificationView. | |
void | updateAppearance () |
Updates the appearance of the view when something changes. | |
Private Attributes | |
boolean | isPressed |
Whether or not the NotificationView is currently pressed. | |
boolean | isMouseOver |
Whether or not the mouse is currently over the view. | |
JLabel | notificationTextLabel |
The text of this notification. | |
IconButton | deleteButton |
The button to delete this notification. | |
Borders | |
These constants are the various border styles that are applied to the NotificationView under various circumstances.
Note that the rather badly-named Border actually determines the background color of the NotificationView as well. | |
final NotificationViewBorder | MOUSEOVER_BORDER |
final NotificationViewBorder | NORMAL_BORDER |
Static Private Attributes | |
static final long | serialVersionUID = 2199089034199693989L |
Prevent serialization collisions. | |
Colors | |
These constants represent colors that are used in displaying the NotificationView. | |
static final Color | NOTIFICATION_COLOR = new Color(0.93f, 0.93f, 0.93f) |
static final Color | MOUSEOVER_NOTIFICATION_COLOR = new Color(0.97f, 0.97f, 0.97f) |
static final Color | NOTIFICATION_STROKE_COLOR = SystemColor.controlShadow |
edu.cmu.hcii.calo.view.notification.NotificationView.NotificationView | ( | Notification | n | ) |
Constructs a NotificationView.
static void edu.cmu.hcii.calo.view.notification.NotificationView.main | ( | String[] | args | ) | [static] |
Runs a small test program to verify that NotificationView works correctly.
args | command-line args; don't bother passing any |
Notification edu.cmu.hcii.calo.view.notification.NotificationView.getNotification | ( | ) |
Returns the Notification associated with this view.
void edu.cmu.hcii.calo.view.notification.NotificationView.mouseClicked | ( | MouseEvent | e | ) |
Defines the behavior of a mouse click on a notification; that is, nothing happens.
e | the mouse event |
void edu.cmu.hcii.calo.view.notification.NotificationView.mouseDragged | ( | MouseEvent | e | ) |
Defines the behavior of a mouse drag on this notification view; that is, nothing happens.
e | the mouse event |
void edu.cmu.hcii.calo.view.notification.NotificationView.mouseEntered | ( | MouseEvent | e | ) |
Updates the mouse over state of this notification view.
e | the mouse event |
void edu.cmu.hcii.calo.view.notification.NotificationView.mouseExited | ( | MouseEvent | e | ) |
Updates the mouse over state of this notification view.
e | the mouse event |
void edu.cmu.hcii.calo.view.notification.NotificationView.mouseMoved | ( | MouseEvent | e | ) |
Defines the behavior of a mouse motion in the notification view; that is, nothing happens.
e | the mouse event |
void edu.cmu.hcii.calo.view.notification.NotificationView.mousePressed | ( | MouseEvent | e | ) |
Updates the pressed state of this notification view.
e | the mouse event |
void edu.cmu.hcii.calo.view.notification.NotificationView.mouseReleased | ( | MouseEvent | e | ) |
Updates the pressed state of this notification view.
e | the mouse event |
void edu.cmu.hcii.calo.view.notification.NotificationView.setup | ( | ) | [private] |
Sets up the appearance of the NotificationView.
String edu.cmu.hcii.calo.view.notification.NotificationView.toString | ( | ) |
Returns a string representation of this NotificationView.
Useful only for debugging.
void edu.cmu.hcii.calo.view.notification.NotificationView.update | ( | ) |
Causes the view to synchronize itself with the Notification model.
void edu.cmu.hcii.calo.view.notification.NotificationView.updateAppearance | ( | ) | [private] |
Updates the appearance of the view when something changes.
Dimension edu.cmu.hcii.calo.view.notification.NotificationView.getPreferredSize | ( | ) |
final long edu.cmu.hcii.calo.view.notification.NotificationView.serialVersionUID = 2199089034199693989L [static, private] |
The notification being represented by this view.
final NotificationViewBorder edu.cmu.hcii.calo.view.notification.NotificationView.MOUSEOVER_BORDER [private] |
Initial value:
new NotificationViewBorder( NotificationView.MOUSEOVER_NOTIFICATION_COLOR, NotificationView.NOTIFICATION_STROKE_COLOR)
final NotificationViewBorder edu.cmu.hcii.calo.view.notification.NotificationView.NORMAL_BORDER [private] |
Initial value:
new NotificationViewBorder( NotificationView.NOTIFICATION_COLOR, NotificationView.NOTIFICATION_STROKE_COLOR)
boolean edu.cmu.hcii.calo.view.notification.NotificationView.isPressed [private] |
Whether or not the NotificationView is currently pressed.
This may be true even if the mouse is not within the bounds of the view.
boolean edu.cmu.hcii.calo.view.notification.NotificationView.isMouseOver [private] |
Whether or not the mouse is currently over the view.
The text of this notification.
The button to delete this notification.