ur_rna.RNAstructureUI.utilities

## Class RequestFocusListener

- java.lang.Object
- - ur_rna.RNAstructureUI.utilities.RequestFocusListener

- All Implemented Interfaces:
    java.util.EventListener, javax.swing.event.AncestorListener

      public class RequestFocusListener
      extends java.lang.Object
      implements javax.swing.event.AncestorListener

  Convenience class to request focus on a component. When the component is added to a realized Window then component will request focus immediately, since the ancestorAdded event is fired immediately. When the component is added to a non realized Window, then the focus request will be made once the window is realized, since the ancestorAdded event will not be fired until then. Using the default constructor will cause the listener to be removed from the component once the AncestorEvent is generated. A second constructor allows you to specify a boolean value of false to prevent the AncestorListener from being removed when the event is generated. This will allow you to reuse the listener each time the event is generated.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private boolean` | `removeListener`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RequestFocusListener()`
    `RequestFocusListener(boolean removeListener)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `ancestorAdded(javax.swing.event.AncestorEvent e)`
    `void` | `ancestorMoved(javax.swing.event.AncestorEvent e)`
    `void` | `ancestorRemoved(javax.swing.event.AncestorEvent e)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### removeListener

          private boolean removeListener

  - ### Constructor Detail

    - #### RequestFocusListener

          public RequestFocusListener()

    - #### RequestFocusListener

          public RequestFocusListener(boolean removeListener)

  - ### Method Detail

    - #### ancestorAdded

          public void ancestorAdded(javax.swing.event.AncestorEvent e)

      Specified by:
        `ancestorAdded` in interface `javax.swing.event.AncestorListener`

    - #### ancestorMoved

          public void ancestorMoved(javax.swing.event.AncestorEvent e)

      Specified by:
        `ancestorMoved` in interface `javax.swing.event.AncestorListener`

    - #### ancestorRemoved

          public void ancestorRemoved(javax.swing.event.AncestorEvent e)

      Specified by:
        `ancestorRemoved` in interface `javax.swing.event.AncestorListener`