Class UIBandBox
public class UIBandBox extends UIMenuList
{
// Fields
public static final int RBS_BANDBORDERS;
public static final int RBS_FIXEDORDER;
public static final int RBS_VARHEIGHT;
// Constructors
public UIBandBox();
// Methods
public void dragBand(int x, int y);
public boolean getBreak(IUIComponent comp);
public boolean getDragBreak(IUIComponent comp);
public int getRoleCode();
public boolean mouseDown(Event e, int x, int y);
public boolean mouseDrag(Event e, int x, int y);
public boolean mouseUp(Event e, int x, int y);
public void paint(FxGraphics g);
}
This class implements a band box control. A UIBandBox control contains multiple band components, each of which is typically a UIBand object, or a component that implements the IUIBand interface.
Note UIBandbox uses UIBarLayout as its layout manager.
UIComponent
|
+--UIContainer
|
+--UIStateContainer
|
+--UIPanel
|
+--UISelector
|
+--UIList
|
+--UIMenuList
|
+--UIBandBox
public UIBandBox();
Creates a band box control.
public void dragBand(int x, int y);
Resizes the currently-tracked band, based on the user's mouse movement at the specified location.
Return Value:
No return value.
Parameter | Description |
x
| The x coordinate of the mouse location.
|
y
| The y coordinate of the mouse location.
|
public boolean getBreak(IUIComponent comp);
Determines whether the break style is set in the specified band component.
Return Value:
Returns true if the current band has the break style set; otherwise, returns false.
Parameter | Description |
comp
| The component to be examined.
|
public boolean getDragBreak(IUIComponent comp);
Determines whether the drag break style is set in the specified band component.
Return Value:
Returns true if the band has the drag break style set; otherwise, returns false.
Parameter | Description |
comp
| The band component to be examined.
|
public int getRoleCode();
Retrieves the ROLE_SYSTEM code that best describes the role of the band box control.
Return Value:
Returns the ROLE_SYSTEM_TOOLBAR code.
public boolean mouseDown(Event e, int x, int y);
Determines whether the mouse button is pressed over a band component in the band box, and if so, targets the band control for dragging.
Return Value:
Returns true if the event was handled; otherwise, returns false.
Parameter | Description |
e
| The event posted to the band box control.
|
x
| The x coordinate of the event.
|
y
| The y coordinate of the event.
|
public boolean mouseDrag(Event e, int x, int y);
Responds to the mouse being dragged over a band component in the band box.
Return Value:
Returns true if the event was handled; otherwise, returns false.
Parameter | Description |
e
| The event posted to the band box control.
|
x
| The x coordinate of the event.
|
y
| The y coordinate of the event.
|
Remarks:
This method vertically rearranges the bands in the band box control to track the mouse point.
public boolean mouseUp(Event e, int x, int y);
Responds to the mouse button being released by toggling the band to either its maximized or minimized size unless a drag operation has just been performed.
Return Value:
Returns true if the event was handled; otherwise, returns false.
Parameter | Description |
e
| The event posted to the band box control.
|
x
| The x coordinate of the event.
|
y
| The y coordinate of the event.
|
public void paint(FxGraphics g);
Draws the band box control.
Return Value:
No return value.
Parameter | Description |
g
| The graphics context.
|
- RBS_BANDBORDERS
- Specifies that each band in the band box have etched edges.
- RBS_FIXEDORDER
- Specifies that the order of the bands in the band box are fixed.
- RBS_VARHEIGHT
- Specifies that each row of bands can have a different height. By default, every row has the same height.