Packages
 In this topic

*Constructors

*Methods

 

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

 


Class UIThumb

public class UIThumb extends UISingleContainer
{
  // Constructors
  public UIThumb();
  public UIThumb(IUIComponent comp);

  // Methods
  public Point getDragStart();
  public int getRoleCode();
  public boolean isKeyable();
  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);
}

This class implements a thumb control. UISplitViewer uses UIThumb to create the splitter component between its content panes. UIBandThumb and UIScrollThumb extend UIThumb.

UIComponent
  |
  +--UIContainer
    |
    +--UIStateContainer
      |
      +--UISingleContainer
        |
        +--UIThumb

Constructors

UIThumb

public UIThumb();

Creates a thumb control with no content.

UIThumb

public UIThumb(IUIComponent comp);

Creates a thumb control using the specified component for content.

ParameterDescription
comp The component to be displayed within the thumb control.

Methods

getDragStart

public Point getDragStart();

Retrieves the point where the mouse down event occurred on the current thumb drag operation.

Return Value:

Returns a Point object representing the position of the original mouse down event.

getRoleCode

public int getRoleCode();

Retrieves the ROLE_SYSTEM code that best describes the role of the thumb control.

Return Value:

Returns the ROLE_SYSTEM_GRIP code.

isKeyable

public boolean isKeyable();

Determines whether the thumb control can receive keyboard input.

Return Value:

Returns true if the control can accept keyboard input; otherwise, returns false.

mouseDown

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

Responds to the mouse button being pressed over the thumb control. The location of the mouse is recorded internally.

Return Value:

Returns false, indicating that the event is to be given to the parent.

ParameterDescription
e The event posted to the 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 button being dragged over the thumb control. This method records the difference between the current position of the mouse and its location when it was last pressed.

Return Value:

Returns false, indicating that the event is to be given to the parent.

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

mouseUp

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

Responds to the mouse button being released over the thumb control. This method records the difference between the location of the mouse when it was released and its location when it was last pressed.

Return Value:

Returns false, indicating that the event is to be given to the parent.

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

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