Package com.ms.ui Previous
Previous
Contents
Contents
Index
Index
Next
Next

Class UIBandBox

Constructors , Methods , Fields

public class UIBandBox extends UIMenuList
{
  // Fields
  public static final int RBS_FIXEDORDER;
  public static final int RBS_BANDBORDERS;
  public static final int RBS_VARHEIGHT;
  public static final int CXEDGE;
  public static final int CYEDGE;

  // Constructors
  public UIBandBox();

  // Methods
  public void dragBand(int x, int y);

  public boolean getBreak(Component comp);
  public boolean getDragBreak(Component comp);
  public int getLineHeight(int first, int last);
  public boolean getMoveable(int i);
  public int getRoleCode();
  public int getRowCount();

  public void paint(Graphics g);
  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);

}

A class that manages a band box control, which contains multiple band objects.


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 as indicated in the given point.

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(Component comp);

Determines if the BREAK attribute is set in the specified band component's style.

Return Value:

Returns true if the style includes BREAK; otherwise, returns false.

ParameterDescription
comp UIBand component to be examined.


getDragBreak

public boolean getDragBreak(Component comp);

Determines if the DRAGBREAK attribute is set in the specified band component's style.

Return Value:

Returns true if the style includes DRAGBREAK; otherwise, returns false.

ParameterDescription
comp UIBand component to be examined.


getLineHeight

public int getLineHeight(int first, int last);

Computes the height of the line of bands within the specified range.

Return Value:

Returns the height of the tallest band in the range.

ParameterDescription
first Index of first band in the range to compute.
last Index of last band in the range to compute.


getMoveable

public boolean getMoveable(int i);

Determines the moveable state of the specified band.

Return Value:

Returns true if the given band can be moved, returns false if it cannot.

ParameterDescription
i Index of the band to be examined.


getRoleCode

public int getRoleCode();

Retrieves the role of the band box control.

Return Value:

Returns the ROLE_SYSTEM code that best describes the role of the band box.

Remarks:

This method returns the ROLE_SYSTEM_TOOLBAR code.


getRowCount

public int getRowCount();

Determines the number of rows in the object's current arrangement.

Return Value:

Returns the number of rows.


mouseDown

public boolean mouseDown(Event e, int x, int y);

Reacts to the mouse button being pressed if in a band control component of the band box control.

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.
y The y coordinate.

Remarks:

If it is determined that the mouse is over a band control (or another control implementing the IUIBand interface) in the band box, the band control is targeted for dragging and the position of the mouse is captured.


mouseDrag

public boolean mouseDrag(Event e, int x, int y);

Reacts to the mouse being dragged in a band component of the band box by vertically rearranging the bands in the band box control to track the mouse point.

Return Value:

Returns true the event was handled; otherwise, returns false.

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


mouseUp

public boolean mouseUp(Event e, int x, int y);

Reacts 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 event was handled; otherwise, returns false.

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


paint

public void paint(Graphics g);

Repaints the band box control.

Return Value:

No return value.

ParameterDescription
g The graphics context.

Remarks:

This method draws band box controls.


Fields

RBS_FIXEDORDER
Style bit indicating whether the order of the bands in the band box are fixed.
RBS_BANDBORDERS
RBS_VARHEIGHT
CXEDGE
Width of the vertical border in pixels.
CYEDGE
Height of the horizontal border in pixels.


Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.