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 |
static void edu.cmu.hcii.calo.view.TaskView.main | ( | String[] | args | ) | [static] |
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 | ) |
final String edu.cmu.hcii.calo.view.TaskView.TASK_EXPANDED_PROPERTY = "TaskExpanded" [static] |
final String edu.cmu.hcii.calo.view.TaskView.TASK_NAME_PROPERTY = "TaskName" [static] |
final String edu.cmu.hcii.calo.view.TaskView.TASK_STARRED_PROPERTY = "TaskStarred" [static] |
final String edu.cmu.hcii.calo.view.TaskView.TASK_COMPLETE_PROPERTY = "TaskComplete" [static] |
final String edu.cmu.hcii.calo.view.TaskView.TASK_DUE_DATE_PROPERTY = "TaskDueDate" [static] |
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] |
final TaskViewBorder edu.cmu.hcii.calo.view.TaskView.MOUSEOVER_BORDER [private] |
final TaskViewBorder edu.cmu.hcii.calo.view.TaskView.EXPANDED_BORDER [private] |
final TaskViewBorder edu.cmu.hcii.calo.view.TaskView.NORMAL_BORDER [private] |
boolean edu.cmu.hcii.calo.view.TaskView.isPressed = false [private] |
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] |
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] |