StretchableLayoutResizerBar Class Reference

Inheritance diagram for StretchableLayoutResizerBar:

Component MouseListener MessageListener List of all members.

Detailed Description

A component that acts as one of the vertical or horizontal bars you see being used to resize panels in a window.

One of these acts with a StretchableLayoutManager to resize the other components.

See also:
StretchableLayoutManager


Public Member Functions

 StretchableLayoutResizerBar (StretchableLayoutManager *const layoutToUse, const int itemIndexInLayout, const bool isBarVertical)
 Creates a resizer bar for use on a specified layout.
 ~StretchableLayoutResizerBar ()
 Destructor.
virtual void hasBeenMoved ()
 This is called when the bar is dragged.
void paint (Graphics &g)
void mouseDown (const MouseEvent &e)
void mouseDrag (const MouseEvent &e)


Constructor & Destructor Documentation

StretchableLayoutResizerBar::StretchableLayoutResizerBar StretchableLayoutManager *const   layoutToUse,
const int  itemIndexInLayout,
const bool  isBarVertical
 

Creates a resizer bar for use on a specified layout.

Parameters:
layoutToUse the layout that will be affected when this bar is dragged
itemIndexInLayout the item index in the layout that corresponds to this bar component. You'll need to set up the item properties in a suitable way for a divider bar, e.g. for an 8-pixel wide bar which, you could call myLayout->setItemLayout (barIndex, 8, 8, 8)
isBarVertical true if it's an upright bar that you drag left and right; false for a horizontal one that you drag up and down

StretchableLayoutResizerBar::~StretchableLayoutResizerBar  ) 
 

Destructor.


Member Function Documentation

virtual void StretchableLayoutResizerBar::hasBeenMoved  )  [virtual]
 

This is called when the bar is dragged.

This method must update the positions of any components whose position is determined by the StretchableLayoutManager, because they might have just moved.

The default implementation calls the resized() method of this component's parent component, because that's often where you're likely to apply the layout, but it can be overridden for more specific needs.

void StretchableLayoutResizerBar::paint Graphics g  )  [virtual]
 

For internal use only.

Reimplemented from Component.

void StretchableLayoutResizerBar::mouseDown const MouseEvent e  )  [virtual]
 

For internal use only.

Reimplemented from Component.

void StretchableLayoutResizerBar::mouseDrag const MouseEvent e  )  [virtual]
 

For internal use only.

Reimplemented from Component.


The documentation for this class was generated from the following file: