Package com.ms.ui |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
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.
public UIThumb();Creates a thumb control with no content.
public UIThumb(Component comp);Creates a thumb control using the specified component for content.
Parameter Description comp The component to be displayed within the thumb control.
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.
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.
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.
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.
Parameter Description e The event that caused the action. x The x coordinate of the event. y The y coordinate of the event.
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.
Parameter Description e The event that caused the action. x The x coordinate of the event. y The y coordinate of the event.
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.
Parameter Description e The event that caused the action. x The x coordinate of the event. y The y coordinate of the event.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.