A component that acts as one of the vertical or horizontal bars you see being used to resize panels in a window. More...
Inherits Component.
Public Member Functions | |
| StretchableLayoutResizerBar (StretchableLayoutManager *layoutToUse, int itemIndexInLayout, 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) |
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.
| StretchableLayoutResizerBar::StretchableLayoutResizerBar | ( | StretchableLayoutManager * | layoutToUse, |
| int | itemIndexInLayout, | ||
| bool | isBarVertical | ||
| ) |
Creates a resizer bar for use on a specified layout.
| 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 |
Destructor.
| 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] |
Reimplemented from Component.
| void StretchableLayoutResizerBar::mouseDown | ( | const MouseEvent & | e | ) | [virtual] |
Reimplemented from Component.
| void StretchableLayoutResizerBar::mouseDrag | ( | const MouseEvent & | e | ) | [virtual] |
Reimplemented from Component.