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

Class UIThumb

Constructors , Methods

public class UIThumb extends UIPanel
{
  // Constructors
  public UIThumb();
  public UIThumb(Component 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);

}

A class that implements a thumb control.


Constructors


UIThumb

public UIThumb();

Creates a thumb control with no content.


UIThumb

public UIThumb(Component 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 occurred on the current thumb drag operation.

Return Value:

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


getRoleCode

public int getRoleCode();

Retrieves the role of the thumb control.

Return Value:

Returns the ROLE_SYSTEM code that best describes the role of the control.

Remarks:

This method 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);

Reacts to the mouse button being pressed over the thumb control by recording that location internally and zeroing the event's coordinates.

Return Value:

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

ParameterDescription
e The event that caused the action.
x The x coordinate of the event.
y The y coordinate of the event.


mouseDrag

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

Reacts to the mouse being dragged over the thumb control by recording in the event the difference in location from when the mouse was last pressed.

Return Value:

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

ParameterDescription
e The event that caused the action.
x The x coordinate of the event.
y The y coordinate of the event.


mouseUp

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

Reacts to the mouse button being released over the thumb control by recording in the event the difference in location from when the mouse was last pressed.

Return Value:

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

ParameterDescription
e The event that caused the action.
x The x coordinate of the event.
y The y coordinate of the event.



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