Inheritance diagram for edu.cmu.hcii.calo.view.task.TaskView:
Public Member Functions | |
TaskView (Task t) | |
Constructs a TaskView representing the given task. | |
Task | getTask () |
Returns the Task associated with this view. | |
boolean | isCurrentDropTarget () |
Returns whether this view is the current target of a drop operation involving some other TaskView. | |
boolean | isExpanded () |
Returns whether this view is currently expanded. | |
boolean | isInDrag () |
Returns whether this view is currently being dragged by the user. | |
void | setCurrentDropTarget (boolean b) |
Sets whether this view is the current drop target of a drop operation involving some other task view. | |
void | setExpanded (boolean isExpanded) |
Expands or contracts this view. | |
String | toString () |
Returns a string representation of this task view. | |
void | update () |
Causes the view to synchronize itself with the Task model. | |
Static Public Member Functions | |
static void | main (String[] args) |
Runs a small test program to verify that TaskView works correctly. | |
Protected Member Functions | |
void | addImpl (Component comp, Object constraints, int index) |
Adds the component to this container at the specified index with the specified constraints, as usual. | |
Private Member Functions | |
String | getOnHoldToolTipString () |
Returns an appropriate HTML string to use as the text of the tooltip for the on hold button for this task. | |
void | setup () |
Sets up the visual 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. | |
Task | task |
The task being represented by this view. | |
HighlightListener | highlightListener = new HighlightListener() |
The shared highlight listener attached to all the controls in this view. | |
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 | MOUSEOVER_BORDER |
final TaskViewBorder | EXPANDED_BORDER |
final TaskViewBorder | MOUSEOVER_EXPANDED_BORDER |
final Border | DROP_TARGET_BORDER |
final TaskViewBorder | NORMAL_BORDER |
Drag and Drop | |
Fields used to implement dragging and dropping task views inside their subpane. | |
boolean | isDragging |
Whether or not the user is currently dragging this TaskView around. | |
Point | clickPoint |
The point at which the user clicked at the beginning of a drag operation. | |
boolean | isCurrentDropTarget |
Whether this view is currently the target of a drop operation involving a different view. | |
Controls | |
Various controls in the view. | |
ExpandedTaskInfoPanel | expandedInfoPanel |
The panel containing the info that's displayed when the TaskView is expanded. | |
IconToggleButton | starButton |
The button allowing the user to star or unstar this task. | |
JLabel | taskNameLabel |
The label showing the name of this task. | |
JTextField | taskNameField |
The field allowing you to edit the name of the task. | |
IconToggleButton | completeBox |
The check box determining whether this task is complete. | |
DisclosureButton | disclosureTriangle |
The disclosure triangle allowing this view to be expanded or contracted. | |
IconToggleButton | caloAddedButton |
The button showing that this task has been added by CALO and allowing the user to verify that it is accurate by clicking it. | |
FlatButton | dueDateButton |
The button that displays the task's current due date and allows the user to change it. | |
IconButton | markOnHoldButton |
The button that allows the user to mark the task as on or off of hold. | |
IconButton | deleteButton |
The button that allows the user to delete this task. | |
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 | TASK_STROKE_COLOR = SystemColor.controlShadow |
Classes | |
class | DragListener |
A MouseListener that handles dragging for this task view. More... | |
class | ExpansionListener |
A MouseListener that handles when the user clicks on the task view to expand or collapse it. More... | |
class | HighlightListener |
A MouseListener that handles displaying the mouseover state of the task view when the user hovers the mouse over it. More... |
edu.cmu.hcii.calo.view.task.TaskView.TaskView | ( | Task | t | ) |
static void edu.cmu.hcii.calo.view.task.TaskView.main | ( | String[] | args | ) | [static] |
Runs a small test program to verify that TaskView works correctly.
args | command-line args; don't bother passing any |
void edu.cmu.hcii.calo.view.task.TaskView.addImpl | ( | Component | comp, | |
Object | constraints, | |||
int | index | |||
) | [protected] |
Adds the component to this container at the specified index with the specified constraints, as usual.
Overridden to also add a highlight listener to the component so that this view will show its mouseover state whenever the mouse is within its bounds.
comp | the component to add | |
constraints | the constraints to add it with | |
index | the index to add it at |
Reimplemented from edu.cmu.hcii.calo.view.CALOComponent.
String edu.cmu.hcii.calo.view.task.TaskView.getOnHoldToolTipString | ( | ) | [private] |
Returns an appropriate HTML string to use as the text of the tooltip for the on hold button for this task.
This is calculated based on the pending state of the task.
Task edu.cmu.hcii.calo.view.task.TaskView.getTask | ( | ) |
Returns the Task associated with this view.
Returns whether this view is the current target of a drop operation involving some other TaskView.
true
if this view is the drop target, false
otherwise boolean edu.cmu.hcii.calo.view.task.TaskView.isExpanded | ( | ) |
Returns whether this view is currently expanded.
true
if the view is expanded, false
otherwise boolean edu.cmu.hcii.calo.view.task.TaskView.isInDrag | ( | ) |
Returns whether this view is currently being dragged by the user.
true
if the view is being dragged, false
otherwise void edu.cmu.hcii.calo.view.task.TaskView.setCurrentDropTarget | ( | boolean | b | ) |
Sets whether this view is the current drop target of a drop operation involving some other task view.
Calling setCurrentDropTarget() updates the appearance of this view to reflect whether it's the drop target or not.
b | true if this view should be the current drop target, false otherwise |
void edu.cmu.hcii.calo.view.task.TaskView.setExpanded | ( | boolean | isExpanded | ) |
Expands or contracts this view.
isExpanded | true if this view should be expanded, false otherwise |
void edu.cmu.hcii.calo.view.task.TaskView.setup | ( | ) | [private] |
Sets up the visual appearance of the TaskView.
void edu.cmu.hcii.calo.view.task.TaskView.toggleExpanded | ( | ) | [private] |
Toggles whether or not the view is expanded.
String edu.cmu.hcii.calo.view.task.TaskView.toString | ( | ) |
Returns a string representation of this task view.
Useful only for debugging.
void edu.cmu.hcii.calo.view.task.TaskView.update | ( | ) |
Causes the view to synchronize itself with the Task model.
void edu.cmu.hcii.calo.view.task.TaskView.updateAppearance | ( | ) | [private] |
Updates the appearance of the view when something changes.
final TaskViewBorder edu.cmu.hcii.calo.view.task.TaskView.MOUSEOVER_BORDER [private] |
final TaskViewBorder edu.cmu.hcii.calo.view.task.TaskView.EXPANDED_BORDER [private] |
final TaskViewBorder edu.cmu.hcii.calo.view.task.TaskView.MOUSEOVER_EXPANDED_BORDER [private] |
final Border edu.cmu.hcii.calo.view.task.TaskView.DROP_TARGET_BORDER [private] |
final TaskViewBorder edu.cmu.hcii.calo.view.task.TaskView.NORMAL_BORDER [private] |
boolean edu.cmu.hcii.calo.view.task.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.task.TaskView.isExpanded = false [private] |
Whether or not the TaskView is currently expanded to show detailed information.
boolean edu.cmu.hcii.calo.view.task.TaskView.isMouseOver = false [private] |
Whether or not the mouse is currently over the view.
The task being represented by this view.
HighlightListener edu.cmu.hcii.calo.view.task.TaskView.highlightListener = new HighlightListener() [private] |
The shared highlight listener attached to all the controls in this view.
This ensures that the mouseover state of the task will be shown even if the mouse is over a child of this view rather than over the view itself.
boolean edu.cmu.hcii.calo.view.task.TaskView.isDragging [private] |
Whether or not the user is currently dragging this TaskView around.
Point edu.cmu.hcii.calo.view.task.TaskView.clickPoint [private] |
The point at which the user clicked at the beginning of a drag operation.
boolean edu.cmu.hcii.calo.view.task.TaskView.isCurrentDropTarget [private] |
Whether this view is currently the target of a drop operation involving a different view.
The panel containing the info that's displayed when the TaskView is expanded.
The button allowing the user to star or unstar this task.
JLabel edu.cmu.hcii.calo.view.task.TaskView.taskNameLabel [private] |
The label showing the name of this task.
JTextField edu.cmu.hcii.calo.view.task.TaskView.taskNameField [private] |
The field allowing you to edit the name of the task.
The check box determining whether this task is complete.
The disclosure triangle allowing this view to be expanded or contracted.
The button showing that this task has been added by CALO and allowing the user to verify that it is accurate by clicking it.
The button that displays the task's current due date and allows the user to change it.
The button that allows the user to mark the task as on or off of hold.
The button that allows the user to delete this task.