edu.cmu.hcii.calo.view.TaskView Class Reference

Collaboration diagram for edu.cmu.hcii.calo.view.TaskView:

Collaboration graph
[legend]
List of all members.

Detailed Description

A view class that displays a single task.

Author:
Brian Ellis


Public Member Functions

String toString ()
 TaskView (Task t)
 Constructs a TaskView.
Dimension getPreferredSize ()
void mouseClicked (MouseEvent e)
void mouseDragged (MouseEvent e)
void mouseEntered (MouseEvent e)
void mouseExited (MouseEvent e)
void mouseMoved (MouseEvent e)
void mousePressed (MouseEvent e)
void mouseReleased (MouseEvent e)
Task getTask ()
double getOpacity ()
void setOpacity (double opacity)

Static Public Member Functions

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

Static Public Attributes

Property identifiers
These identifiers are used in PropertyChangeEvents to identify which property has changed.

static final String TASK_EXPANDED_PROPERTY = "TaskExpanded"
static final String TASK_NAME_PROPERTY = "TaskName"
static final String TASK_STARRED_PROPERTY = "TaskStarred"
static final String TASK_COMPLETE_PROPERTY = "TaskComplete"
static final String TASK_DUE_DATE_PROPERTY = "TaskDueDate"

Private Member Functions

void setup ()
 Sets up the appearance of the TaskView.
void toggleExpanded ()
 Toggles whether or not the view is expanded.
void updateAppearance ()
 Updates the appearance of the view when something changes.

Private Attributes

boolean isPressed = false
 Whether or not the TaskView is currently pressed.
boolean isExpanded = false
 Whether or not the TaskView is currently expanded to show detailed information.
boolean isMouseOver = false
 Whether or not the mouse is currently over the view.
JLabel placeholderLabel
 A placeholder label.
StarButton starButton
 The button allowing the user to star or unstar this task.
boolean isDragging
 True if the user is currently dragging this TaskView around.
JLabel taskNameLabel
Task task
Borders
These constants are the various border styles that are applied to the TaskView under various circumstances.

Note that the rather badly-named Border actually determines the background color of the TaskView as well.

final TaskViewBorder PRESSED_BORDER
final TaskViewBorder MOUSEOVER_BORDER
final TaskViewBorder EXPANDED_BORDER
final TaskViewBorder MOUSEOVER_EXPANDED_BORDER
final TaskViewBorder NORMAL_BORDER

Static Private Attributes

Colors
These constants represent colors that are used in displaying the TaskView.

static final Color TASK_COLOR = new Color(0.93f, 0.93f, 0.93f)
static final Color EXPANDED_TASK_COLOR = new Color(1.0f, 1.0f, 0.87f)
static final Color MOUSEOVER_TASK_COLOR = new Color(0.97f, 0.97f, 0.97f)
static final Color MOUSEOVER_EXPANDED_TASK_COLOR = new Color(1.0f, 1.0f, 0.93f)
static final Color PRESSED_TASK_COLOR = SystemColor.textHighlight
static final Color TASK_STROKE_COLOR = SystemColor.controlShadow
Layout
These constants represent layout parameters.

static final int HORIZONTAL_MARGIN = 6
static final int VERTICAL_MARGIN = 8
static final int HORIZONTAL_CONTROL_SPACING = 4
static final int VERTICAL_CONTROL_SPACING = 4


Constructor & Destructor Documentation

edu.cmu.hcii.calo.view.TaskView.TaskView ( Task  t  ) 

Constructs a TaskView.


Member Function Documentation

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

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

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

String edu.cmu.hcii.calo.view.TaskView.toString (  ) 

Dimension edu.cmu.hcii.calo.view.TaskView.getPreferredSize (  ) 

void edu.cmu.hcii.calo.view.TaskView.mouseClicked ( MouseEvent  e  ) 

void edu.cmu.hcii.calo.view.TaskView.mouseDragged ( MouseEvent  e  ) 

void edu.cmu.hcii.calo.view.TaskView.mouseEntered ( MouseEvent  e  ) 

void edu.cmu.hcii.calo.view.TaskView.mouseExited ( MouseEvent  e  ) 

void edu.cmu.hcii.calo.view.TaskView.mouseMoved ( MouseEvent  e  ) 

void edu.cmu.hcii.calo.view.TaskView.mousePressed ( MouseEvent  e  ) 

void edu.cmu.hcii.calo.view.TaskView.mouseReleased ( MouseEvent  e  ) 

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

Sets up the appearance of the TaskView.

void edu.cmu.hcii.calo.view.TaskView.toggleExpanded (  )  [private]

Toggles whether or not the view is expanded.

void edu.cmu.hcii.calo.view.TaskView.updateAppearance (  )  [private]

Updates the appearance of the view when something changes.

Task edu.cmu.hcii.calo.view.TaskView.getTask (  ) 

double edu.cmu.hcii.calo.view.TaskView.getOpacity (  ) 

void edu.cmu.hcii.calo.view.TaskView.setOpacity ( double  opacity  ) 


Member Data Documentation

final String edu.cmu.hcii.calo.view.TaskView.TASK_EXPANDED_PROPERTY = "TaskExpanded" [static]

Todo:
There are more of these that need to be added later.

final String edu.cmu.hcii.calo.view.TaskView.TASK_NAME_PROPERTY = "TaskName" [static]

Todo:
There are more of these that need to be added later.

final String edu.cmu.hcii.calo.view.TaskView.TASK_STARRED_PROPERTY = "TaskStarred" [static]

Todo:
There are more of these that need to be added later.

final String edu.cmu.hcii.calo.view.TaskView.TASK_COMPLETE_PROPERTY = "TaskComplete" [static]

Todo:
There are more of these that need to be added later.

final String edu.cmu.hcii.calo.view.TaskView.TASK_DUE_DATE_PROPERTY = "TaskDueDate" [static]

Todo:
There are more of these that need to be added later.

final Color edu.cmu.hcii.calo.view.TaskView.TASK_COLOR = new Color(0.93f, 0.93f, 0.93f) [static, private]

final Color edu.cmu.hcii.calo.view.TaskView.EXPANDED_TASK_COLOR = new Color(1.0f, 1.0f, 0.87f) [static, private]

final Color edu.cmu.hcii.calo.view.TaskView.MOUSEOVER_TASK_COLOR = new Color(0.97f, 0.97f, 0.97f) [static, private]

final Color edu.cmu.hcii.calo.view.TaskView.MOUSEOVER_EXPANDED_TASK_COLOR = new Color(1.0f, 1.0f, 0.93f) [static, private]

final Color edu.cmu.hcii.calo.view.TaskView.PRESSED_TASK_COLOR = SystemColor.textHighlight [static, private]

final Color edu.cmu.hcii.calo.view.TaskView.TASK_STROKE_COLOR = SystemColor.controlShadow [static, private]

final int edu.cmu.hcii.calo.view.TaskView.HORIZONTAL_MARGIN = 6 [static, private]

final int edu.cmu.hcii.calo.view.TaskView.VERTICAL_MARGIN = 8 [static, private]

final int edu.cmu.hcii.calo.view.TaskView.HORIZONTAL_CONTROL_SPACING = 4 [static, private]

final int edu.cmu.hcii.calo.view.TaskView.VERTICAL_CONTROL_SPACING = 4 [static, private]

final TaskViewBorder edu.cmu.hcii.calo.view.TaskView.PRESSED_BORDER [private]

Initial value:

        new TaskViewBorder(TaskView.PRESSED_TASK_COLOR, TaskView.TASK_STROKE_COLOR)

final TaskViewBorder edu.cmu.hcii.calo.view.TaskView.MOUSEOVER_BORDER [private]

Initial value:

        new TaskViewBorder(TaskView.MOUSEOVER_TASK_COLOR, TaskView.TASK_STROKE_COLOR)

final TaskViewBorder edu.cmu.hcii.calo.view.TaskView.EXPANDED_BORDER [private]

Initial value:

        new TaskViewBorder(TaskView.EXPANDED_TASK_COLOR, TaskView.TASK_STROKE_COLOR)

final TaskViewBorder edu.cmu.hcii.calo.view.TaskView.MOUSEOVER_EXPANDED_BORDER [private]

Initial value:

        new TaskViewBorder(TaskView.MOUSEOVER_EXPANDED_TASK_COLOR, TaskView.TASK_STROKE_COLOR)

final TaskViewBorder edu.cmu.hcii.calo.view.TaskView.NORMAL_BORDER [private]

Initial value:

        new TaskViewBorder(TaskView.TASK_COLOR, TaskView.TASK_STROKE_COLOR)

boolean edu.cmu.hcii.calo.view.TaskView.isPressed = false [private]

Whether or not the TaskView 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.TaskView.isExpanded = false [private]

Whether or not the TaskView is currently expanded to show detailed information.

boolean edu.cmu.hcii.calo.view.TaskView.isMouseOver = false [private]

Whether or not the mouse is currently over the view.

JLabel edu.cmu.hcii.calo.view.TaskView.placeholderLabel [private]

A placeholder label.

Todo:
This is just a placeholder for event details.

StarButton edu.cmu.hcii.calo.view.TaskView.starButton [private]

The button allowing the user to star or unstar this task.

boolean edu.cmu.hcii.calo.view.TaskView.isDragging [private]

True if the user is currently dragging this TaskView around.

JLabel edu.cmu.hcii.calo.view.TaskView.taskNameLabel [private]

Task edu.cmu.hcii.calo.view.TaskView.task [private]


The documentation for this class was generated from the following file:
Generated on Mon Jul 9 12:34:42 2007 for CALO by  doxygen 1.5.2