Class FocusManager
java.lang.Object
org.apache.batik.bridge.FocusManager
- Direct Known Subclasses:
SVG12FocusManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThe class that is responsible for tracking 'DOMFocusIn' changes.protected classThe class that is responsible for tracking 'DOMFocusOut' changes.protected classThe class that is responsible for tracking 'mouseclick' changes.protected classThe class that is responsible to update the focus according to 'mouseout' event.protected classThe class that is responsible to update the focus according to 'mouseover' event. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DocumentThe document.protected EventListenerThe EventListener that tracks 'DOMFocusIn' events.protected EventListenerThe EventListener that tracks 'DOMFocusOut' events.protected EventTargetThe element that has the focus so far.protected EventListenerThe EventListener that tracks 'mouseclick' events.protected EventListenerThe EventListener that tracks 'mouseout' events.protected EventListenerThe EventListener that tracks 'mouseover' events. -
Constructor Summary
ConstructorsConstructorDescriptionFocusManager(Document doc) Constructs a newFocusManagerfor the specified document. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds the event listeners to the document.voiddispose()Removes all listeners attached to the document and that manage focus.protected voidfireDOMActivateEvent(EventTarget target, int detailArg) Fires a 'DOMActivate' event to the specified target.protected voidfireDOMFocusInEvent(EventTarget target, EventTarget relatedTarget) Fires a 'DOMFocusIn' event to the specified target.protected voidfireDOMFocusOutEvent(EventTarget target, EventTarget relatedTarget) Fires a 'DOMFocusOut' event to the specified target.Returns the current element that has the focus or null if any.protected voidRemoves the event listeners from the document.
-
Field Details
-
lastFocusEventTarget
The element that has the focus so far. -
document
The document. -
mouseclickListener
The EventListener that tracks 'mouseclick' events. -
domFocusInListener
The EventListener that tracks 'DOMFocusIn' events. -
domFocusOutListener
The EventListener that tracks 'DOMFocusOut' events. -
mouseoverListener
The EventListener that tracks 'mouseover' events. -
mouseoutListener
The EventListener that tracks 'mouseout' events.
-
-
Constructor Details
-
FocusManager
Constructs a newFocusManagerfor the specified document.- Parameters:
doc- the document
-
-
Method Details
-
addEventListeners
Adds the event listeners to the document. -
removeEventListeners
Removes the event listeners from the document. -
getCurrentEventTarget
Returns the current element that has the focus or null if any. -
dispose
public void dispose()Removes all listeners attached to the document and that manage focus. -
fireDOMFocusInEvent
Fires a 'DOMFocusIn' event to the specified target.- Parameters:
target- the newly focussed event targetrelatedTarget- the previously focussed event target
-
fireDOMFocusOutEvent
Fires a 'DOMFocusOut' event to the specified target.- Parameters:
target- the previously focussed event targetrelatedTarget- the newly focussed event target
-
fireDOMActivateEvent
Fires a 'DOMActivate' event to the specified target.- Parameters:
target- the event targetdetailArg- the detailArg parameter of the event
-