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

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

Collaboration graph
[legend]
List of all members.

Detailed Description

A view that shows a title bar with widgets that interact with a TaskSubpaneView.

When a widget is clicked, the state of the title bar changes, and a propertyChange is fired that can be listened for by the enclosing view. The widgets also change to reflect the actions available in the new state.

Author:
Brian Ellis


Public Member Functions

void setState (SubpaneState state)
 Changes the widgets to reflect the actions available from the given state, and fires a property change informing any property change listeners (like, say, a TaskSubpaneView) that the state has changed.
 TaskSubpaneTitleView (String title)
 Constructs a title view with the given title.
Dimension getPreferredSize ()

Protected Member Functions

void paintComponent (Graphics arg0)

Protected Attributes

SubpaneState currentState = SubpaneState.NORMAL
 The current state of this subpane's title bar widgets.

Package Attributes

IconButton minimizeButton
 The minimize button.
IconButton normalizeButton
 The normalize button.
IconButton maximizeButton
 The maximize button.
JLabel titleLabel
 The label containing the title for this title bar.

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.
Positioning
These constants are various relative positions and layout bindings that are used to lay out the widgets in the title bar.

static final RelativePosition VERTICALLY_CENTERED_ON
static final RelativePosition LEFT_OF
static final RelativePosition OVERLAPPING_LEFT_OF
static final Binding LEFT_EDGE
static final Binding RIGHT_EDGE
static final Binding TOP_ALIGN

Classes

class  TitleButtonListener
 An action listener that knows how to change states in response to a titlebar button being clicked. More...


Constructor & Destructor Documentation

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

Constructs a title view with the given title.

Parameters:
title the title to show in this view


Member Function Documentation

void edu.cmu.hcii.calo.view.TaskSubpaneTitleView.setState ( SubpaneState  state  ) 

Changes the widgets to reflect the actions available from the given state, and fires a property change informing any property change listeners (like, say, a TaskSubpaneView) that the state has changed.

This method can also be invoked by an external instance to force the title bar widgets to change to a new state. This will trigger a propertyChange, however, so if the calling instance is also listening for such changes, it should be sure not to call setState(SubpaneState) unless the state the titlebar is in after the propertyChange is different from the state it should be in.

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

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


Member Data Documentation

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

Prevent serialization collisions.

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

The title that should be displayed by this title bar.

SubpaneState edu.cmu.hcii.calo.view.TaskSubpaneTitleView.currentState = SubpaneState.NORMAL [protected]

The current state of this subpane's title bar widgets.

Defaults to SubpaneState.NORMAL.

IconButton edu.cmu.hcii.calo.view.TaskSubpaneTitleView.minimizeButton [package]

The minimize button.

IconButton edu.cmu.hcii.calo.view.TaskSubpaneTitleView.normalizeButton [package]

The normalize button.

IconButton edu.cmu.hcii.calo.view.TaskSubpaneTitleView.maximizeButton [package]

The maximize button.

JLabel edu.cmu.hcii.calo.view.TaskSubpaneTitleView.titleLabel [package]

The label containing the title for this title bar.

final RelativePosition edu.cmu.hcii.calo.view.TaskSubpaneTitleView.VERTICALLY_CENTERED_ON [static, private]

Initial value:

 new RelativePosition(
            Edge.VERTICAL_CENTER, 0, Direction.BELOW, Edge.VERTICAL_CENTER)

final RelativePosition edu.cmu.hcii.calo.view.TaskSubpaneTitleView.LEFT_OF [static, private]

Initial value:

 new RelativePosition(
            Edge.RIGHT, 4, Direction.LEFT, Edge.LEFT)

final RelativePosition edu.cmu.hcii.calo.view.TaskSubpaneTitleView.OVERLAPPING_LEFT_OF [static, private]

Initial value:

 new RelativePosition(
            Edge.RIGHT, 6, Direction.RIGHT, Edge.LEFT)

final Binding edu.cmu.hcii.calo.view.TaskSubpaneTitleView.LEFT_EDGE [static, private]

Initial value:

 new Binding(Edge.LEFT, 8,
            Direction.RIGHT, Edge.LEFT, null)

final Binding edu.cmu.hcii.calo.view.TaskSubpaneTitleView.RIGHT_EDGE [static, private]

Initial value:

 new Binding(Edge.RIGHT, 8,
            Direction.LEFT, Edge.RIGHT, null)

final Binding edu.cmu.hcii.calo.view.TaskSubpaneTitleView.TOP_ALIGN [static, private]

Initial value:

 new Binding(Edge.TOP, 4,
            Direction.BELOW, Edge.TOP, null)


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