| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| private final Object | lastUpdateLock
Locking object for synchronizing access to lastUpdateMillis. |
| private long | lastUpdateMillis
The last time the cursor was updated, in milliseconds. |
| private final GlobalCursorManager. | nativeUpdater
Use a singleton NativeUpdater for better performance. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| protected abstract Component | findHeavyweightUnderCursor(boolean
If true, the implementation is free to use caching
mechanisms because the Z-order, visibility, and enabled state of the
Components has not changed. If false, the implementation should not
make these assumptions. useCache)Returns the most specific, visible, heavyweight Component under the cursor. |
| protected abstract void | |
| protected abstract Point | |
| protected abstract void | |
| public void | updateCursorImmediately()
Should be called for any activity at the Java level which may affect the global cursor, except for Java MOUSE_MOVED events. |
| public void | updateCursorImmediately(InputEvent
the InputEvent which triggered the cursor update. e)Should be called in response to Java MOUSE_MOVED events. |
| public void | updateCursorLater(Component heavy)
Should be called in response to a native mouse enter or native mouse button released message. |
| protected void |
| lastUpdateLock | back to summary |
|---|---|
| private final Object lastUpdateLock Locking object for synchronizing access to lastUpdateMillis. The VM does not guarantee atomicity of longs. | |
| lastUpdateMillis | back to summary |
|---|---|
| private long lastUpdateMillis The last time the cursor was updated, in milliseconds. | |
| nativeUpdater | back to summary |
|---|---|
| private final GlobalCursorManager. Use a singleton NativeUpdater for better performance. We cannot use a singleton InvocationEvent because we want each event to have a fresh timestamp. | |
| GlobalCursorManager | back to summary |
|---|---|
| protected GlobalCursorManager() | |
| _updateCursor | back to summary |
|---|---|
| private void _updateCursor(boolean useCache) Updates the global cursor. We apply a three-step scheme to cursor updates:
(1) InputEvent updates which are outdated are discarded by
(2) If 'useCache' is true, the native code is free to use a cached value to determine the most specific, visible, enabled heavyweight because this update is occurring in response to a mouse move. If 'useCache' is false, the native code must perform a new search given the current mouse coordinates. (3) Once we have determined the most specific, visible, enabled heavyweight, we use findComponentAt to find the most specific, visible, enabled Component. | |
| findHeavyweightUnderCursor | back to summary |
|---|---|
| protected abstract Component findHeavyweightUnderCursor(boolean useCache) Returns the most specific, visible, heavyweight Component under the cursor. This method should return null iff the cursor is not over any Java Window.
| |
| getCursorPos | back to summary |
|---|---|
| protected abstract void getCursorPos(Point p) Returns the global cursor position, in screen coordinates. | |
| getLocationOnScreen | back to summary |
|---|---|
| protected abstract Point getLocationOnScreen(Component com) | |
| setCursor | back to summary |
|---|---|
| protected abstract void setCursor(Component comp, Cursor cursor, boolean useCache) Set the global cursor to the specified cursor. The component over which the Cursor current resides is provided as a convenience. Not all platforms may require the Component. | |
| updateCursorImmediately | back to summary |
|---|---|
| public void updateCursorImmediately() Should be called for any activity at the Java level which may affect the global cursor, except for Java MOUSE_MOVED events. | |
| updateCursorImmediately | back to summary |
|---|---|
| public void updateCursorImmediately(InputEvent e) Should be called in response to Java MOUSE_MOVED events. The update will be discarded if the InputEvent is outdated.
| |
| updateCursorLater | back to summary |
|---|---|
| public void updateCursorLater(Component heavy) Should be called in response to a native mouse enter or native mouse button released message. Should not be called during a mouse drag. | |
| updateCursorOutOfJava | back to summary |
|---|---|
| protected void updateCursorOutOfJava() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void |
| pending | back to summary |
|---|---|
| pack-priv boolean pending | |
| NativeUpdater | back to summary |
|---|---|
| pack-priv NativeUpdater() | |
| postIfNotPending | back to summary |
|---|---|
| public void postIfNotPending(Component heavy, InvocationEvent in) | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |