edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView Class Reference

Collaboration diagram for edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView:

Collaboration graph
[legend]
List of all members.

Detailed Description

A view that shows a title bar for a TaskSubpaneView, containing a collapse button.

When the button is clicked, the state of the title bar changes, and a propertyChange is fired that can be listened for by the enclosing view. The widget also changes to reflect whether the subpane is now collapsed or expanded.

Author:
Brian Ellis


Controls

The various controls in the view.

IconToggleButton minimizeButton
 The minimize button.
JLabel titleLabel
 The label containing the title for this title bar.
JLabel titleShadowLabel
 The label containing the shadow of the title for this title bar.

Public Member Functions

 TaskSubpaneTitleView (String title)
 Constructs a title view with the given title.
Dimension getPreferredSize ()
 Returns the preferred size of the title view, which will be either 19 or 46 pixels high depending on whether it is collapsed or not.
boolean isCollapsed ()
 Returns whether this title view is currently showing a collapsed state.
void setCollapsed (boolean isCollapsed)
 Sets whether this view is drawing itself in a collapsed state.
void setTitle (String string)
 Sets the title of this view.

Protected Member Functions

void paintComponent (Graphics graphics)
 Draws a pretty gradient on the title view using the system theme colors.

Protected Attributes

boolean isCollapsed = false
 Whether this title view is currently showing a collapsed state.

Private Member Functions

void setup ()
 Sets up the visual appearance of this view.

Private Attributes

String title
 The title that should be displayed by this title bar.

Static Private Attributes

static final long serialVersionUID = 5016556472007849539L
 Prevent serialization collisions.

Classes

class  CollapseButtonListener
 A listener that toggles the collapsed state of the view and fires off the appropriate property change event so the subpane itself can change its state. More...


Constructor & Destructor Documentation

edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView.TaskSubpaneTitleView ( String  title  ) 

Constructs a title view with the given title.

Parameters:
title the title to show in this view


Member Function Documentation

Dimension edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView.getPreferredSize (  ) 

Returns the preferred size of the title view, which will be either 19 or 46 pixels high depending on whether it is collapsed or not.

If setPreferredSize() is called on this view, the size that has been set will take precedence as usual.

boolean edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView.isCollapsed (  ) 

Returns whether this title view is currently showing a collapsed state.

Returns:
true if this title view is collapsed, false otherwise

void edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView.paintComponent ( Graphics  graphics  )  [protected]

Draws a pretty gradient on the title view using the system theme colors.

Parameters:
graphics the graphics context to paint into

void edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView.setCollapsed ( boolean  isCollapsed  ) 

Sets whether this view is drawing itself in a collapsed state.

This is called automatically when the collapse/expand widget is clicked, and may also be invoked externally. When called, it updates the visual state of the view and then fires a property change with a name of TaskViewPropertyNames.SUBPANE_COLLAPSED_PROPERTY_NAME indicating the previous and current collapsed states (as booleans, true meaning collapsed). This is fired even if the previous and current states are the same.

Parameters:
isCollapsed true if the view should appear collapsed, false otherwise

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

Sets up the visual appearance of this view.

void edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView.setTitle ( String  string  ) 

Sets the title of this view.

Parameters:
string the title to set


Member Data Documentation

final long edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView.serialVersionUID = 5016556472007849539L [static, private]

Prevent serialization collisions.

IconToggleButton edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView.minimizeButton [package]

The minimize button.

JLabel edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView.titleLabel [private]

The label containing the title for this title bar.

JLabel edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView.titleShadowLabel [private]

The label containing the shadow of the title for this title bar.

boolean edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView.isCollapsed = false [protected]

Whether this title view is currently showing a collapsed state.

String edu.cmu.hcii.calo.view.task.TaskSubpaneTitleView.title [private]

The title that should be displayed by this title bar.


The documentation for this class was generated from the following file:
Generated on Mon Aug 13 15:06:27 2007 for CALO by  doxygen 1.5.2