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.
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... |
edu.cmu.hcii.calo.view.TaskSubpaneTitleView.TaskSubpaneTitleView | ( | String | title | ) |
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 | ( | ) |
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
.
The minimize button.
The normalize button.
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)