Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.batik.bridge
Class FocusManager

    java.lang.Object
      org.apache.batik.bridge.FocusManager

public class FocusManager
extends java.lang.Object

A class that manages focus on elements.

Nested Class Summary
`protected class` | `FocusManager.DOMFocusInTracker` The class that is responsible for tracking 'DOMFocusIn' changes.
`protected class` | `FocusManager.DOMFocusOutTracker` The class that is responsible for tracking 'DOMFocusOut' changes.
`protected class` | `FocusManager.MouseClickTacker` The class that is responsible for tracking 'mouseclick' changes.
`protected class` | `FocusManager.MouseOutTacker` The class that is responsible to update the focus according to 'mouseout' event.
`protected class` | `FocusManager.MouseOverTacker` The class that is responsible to update the focus according to 'mouseover' event.

Field Summary
`protected org.w3c.dom.Document` | `document` The document.
`protected org.w3c.dom.events.EventListener` | `domFocusInListener` The EventListener that tracks 'DOMFocusIn' events.
`protected org.w3c.dom.events.EventListener` | `domFocusOutListener` The EventListener that tracks 'DOMFocusOut' events.
`protected org.w3c.dom.events.EventTarget` | `lastFocusEventTarget` The element that has the focus so far.
`protected org.w3c.dom.events.EventListener` | `mouseclickListener` The EventListener that tracks 'mouseclick' events.
`protected org.w3c.dom.events.EventListener` | `mouseoutListener` The EventListener that tracks 'mouseout' events.
`protected org.w3c.dom.events.EventListener` | `mouseoverListener` The EventListener that tracks 'mouseover' events.

Constructor Summary
`FocusManager(org.w3c.dom.Document doc)` Constructs a new `FocusManager` for the specified document.

Method Summary
`void` | `dispose()` Removes all listeners attached to the document and that manage focus.
`protected void` | `fireDOMActivateEvent(org.w3c.dom.events.EventTarget target, int detailArg)` Fires a 'DOMActivate' event to the specified target.
`protected void` | `fireDOMFocusInEvent(org.w3c.dom.events.EventTarget target)` Fires a 'DOMFocusIn' event to the specified target.
`protected void` | `fireDOMFocusOutEvent(org.w3c.dom.events.EventTarget target)` Fires a 'DOMFocusOut' event to the specified target.
`org.w3c.dom.events.EventTarget` | `getCurrentEventTarget()` Returns the current element that has the focus or null if any.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### lastFocusEventTarget

    protected org.w3c.dom.events.EventTarget lastFocusEventTarget

  The element that has the focus so far.

### document

    protected org.w3c.dom.Document document

  The document.

### mouseclickListener

    protected org.w3c.dom.events.EventListener mouseclickListener

  The EventListener that tracks 'mouseclick' events.

### domFocusInListener

    protected org.w3c.dom.events.EventListener domFocusInListener

  The EventListener that tracks 'DOMFocusIn' events.

### domFocusOutListener

    protected org.w3c.dom.events.EventListener domFocusOutListener

  The EventListener that tracks 'DOMFocusOut' events.

### mouseoverListener

    protected org.w3c.dom.events.EventListener mouseoverListener

  The EventListener that tracks 'mouseover' events.

### mouseoutListener

    protected org.w3c.dom.events.EventListener mouseoutListener

  The EventListener that tracks 'mouseout' events.

Constructor Detail

### FocusManager

    public FocusManager(org.w3c.dom.Document doc)

  Constructs a new `FocusManager` for the specified document.

Parameters:
  `doc` - the document

Method Detail

### getCurrentEventTarget

    public org.w3c.dom.events.EventTarget 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

    protected void fireDOMFocusInEvent(org.w3c.dom.events.EventTarget target)

  Fires a 'DOMFocusIn' event to the specified target.

  Parameters:
    `target` - the event target

### fireDOMFocusOutEvent

    protected void fireDOMFocusOutEvent(org.w3c.dom.events.EventTarget target)

  Fires a 'DOMFocusOut' event to the specified target.

  Parameters:
    `target` - the event target

### fireDOMActivateEvent

    protected void fireDOMActivateEvent(org.w3c.dom.events.EventTarget target,
                                        int detailArg)

  Fires a 'DOMActivate' event to the specified target.

  Parameters:
    `target` - the event target
    `detailArg` - the detailArg parameter of the event

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Apache Software Foundation. All Rights Reserved.