Packages
 In this topic

*Constructors

*Methods

*Fields

 

Packages   PreviousThis PackageNext
Package com.ms.ui   Previous This
Package
Next

 


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

Constructors

UIBandBox

public UIBandBox();

Creates a band box control.

Methods

dragBand

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.

ParameterDescription
x The x coordinate of the mouse location.
y The y coordinate of the mouse location.

getBreak

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.

ParameterDescription
comp The component to be examined.

getDragBreak

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.

ParameterDescription
comp The band component to be examined.

getRoleCode

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.

mouseDown

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.

ParameterDescription
e The event posted to the band box control.
x The x coordinate of the event.
y The y coordinate of the event.

mouseDrag

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.

ParameterDescription
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.

mouseUp

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.

ParameterDescription
e The event posted to the band box control.
x The x coordinate of the event.
y The y coordinate of the event.

paint

public void paint(FxGraphics g);

Draws the band box control.

Return Value:

No return value.

ParameterDescription
g The graphics context.

Fields

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.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.