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
public UIThumb();
Creates a thumb control with no content.
public UIThumb(IUIComponent 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 event occurred on the current thumb drag operation.
Return Value:
Returns a Point object representing the position of the original mouse down event.
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.
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);
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.
Parameter | Description |
e
| The event posted to the control.
|
x
| The x coordinate of the event.
|
y
| The y coordinate of the event.
|
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.
Parameter | Description |
e
| The event posted to the control.
|
x
| The x coordinate of the event.
|
y
| The y coordinate of the event.
|
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.
Parameter | Description |
e
| The event posted to the control.
|
x
| The x coordinate of the event.
|
y
| The y coordinate of the event.
|