public class CursorManager extends java.lang.Object
setNewCursor(Cursor, Object)
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.CopyOnWriteArrayList<java.awt.Component> |
components |
private java.util.LinkedHashMap<java.lang.Object,java.awt.Cursor> |
cursors |
Constructor and Description |
---|
CursorManager(java.awt.Component forComponent)
Creates a new NavigationCursorManager
|
Modifier and Type | Method and Description |
---|---|
void |
addComponent(java.awt.Component forComponent)
Adds a component that this manager should send cursor changes to.
|
private java.awt.Cursor |
getCurrentCursor() |
void |
removeComponent(java.awt.Component forComponent)
Removes a component that this manager should send cursor changes to.
|
void |
resetCursor(java.lang.Object reference)
Remove the new cursor that was set with the given reference object.
|
void |
setNewCursor(java.awt.Cursor cursor,
java.lang.Object reference)
Set new cursor.
|
private void |
updateCursor() |
private final java.util.LinkedHashMap<java.lang.Object,java.awt.Cursor> cursors
private final java.util.concurrent.CopyOnWriteArrayList<java.awt.Component> components
public CursorManager(java.awt.Component forComponent)
forComponent
- The initial component the cursor should be managed for.public void addComponent(java.awt.Component forComponent)
forComponent
- The component.public void removeComponent(java.awt.Component forComponent)
forComponent
- The component.public void setNewCursor(java.awt.Cursor cursor, java.lang.Object reference)
cursor
- The new cursor to use.reference
- A reference object that can be passed to the next set/reset calls to identify the caller.public void resetCursor(java.lang.Object reference)
reference
- A reference object that can be passed to the next set/reset calls to identify the caller.private void updateCursor()
private java.awt.Cursor getCurrentCursor()