ur_rna.RNAstructureUI.menus

## Class MenuRolloverAdapter

- java.lang.Object
- - ur_rna.RNAstructureUI.menus.MenuRolloverAdapter

- All Implemented Interfaces:
    java.awt.event.MouseListener, java.io.Serializable, java.util.EventListener

      public class MenuRolloverAdapter
      extends java.lang.Object
      implements java.awt.event.MouseListener, java.io.Serializable

  An inner class that creates a rollover listener for menus in the RNAstructure GUI.
  The rollover text is placed in the message bar at the bottom of the main application frame, whenever a user interacts with the menu item this listener is attached to, and removed to make way for the default message text when the user stops interacting with the menu item.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.util.function.Consumer<java.lang.String>` | `rolloverHandler`
    `private java.util.HashMap<java.lang.Object,java.lang.String>` | `rollovers`
    `private static long` | `serialVersionUID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MenuRolloverAdapter(java.util.function.Consumer<java.lang.String> rolloverHandler)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(javax.swing.JMenuItem item, java.lang.String rolloverText)`
    `void` | `addFromToolTips(javax.swing.JComponent parentMenu)` Convert tooltips to rollover text.
    `static MenuRolloverAdapter` | `fromToolTips(java.util.function.Consumer<java.lang.String> rolloverHandler, javax.swing.JComponent parentMenu)`
    `void` | `mouseClicked(java.awt.event.MouseEvent e)`
    `void` | `mouseEntered(java.awt.event.MouseEvent e)`
    `void` | `mouseExited(java.awt.event.MouseEvent e)`
    `void` | `mousePressed(java.awt.event.MouseEvent e)`
    `void` | `mouseReleased(java.awt.event.MouseEvent e)`
    `private void` | `reset()` Reset the main frame message bar text to its default.
    `private void` | `set(java.lang.Object ref)` Set the main frame message bar text to this listener's specific rollover text.

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

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

- - ### Field Detail

    - #### rolloverHandler

          private final java.util.function.Consumer<java.lang.String> rolloverHandler

    - #### rollovers

          private java.util.HashMap<java.lang.Object,java.lang.String> rollovers

    - #### serialVersionUID

          private static final long serialVersionUID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MenuRolloverAdapter

          public MenuRolloverAdapter(java.util.function.Consumer<java.lang.String> rolloverHandler)

  - ### Method Detail

    - #### add

          public void add(javax.swing.JMenuItem item,
                          java.lang.String rolloverText)

    - #### addFromToolTips

          public void addFromToolTips(javax.swing.JComponent parentMenu)

      Convert tooltips to rollover text.

    - #### fromToolTips

          public static MenuRolloverAdapter fromToolTips(java.util.function.Consumer<java.lang.String> rolloverHandler,
                                                         javax.swing.JComponent parentMenu)

    - #### mouseClicked

          public void mouseClicked(java.awt.event.MouseEvent e)

      Specified by:
        `mouseClicked` in interface `java.awt.event.MouseListener`

    - #### mouseEntered

          public void mouseEntered(java.awt.event.MouseEvent e)

      Specified by:
        `mouseEntered` in interface `java.awt.event.MouseListener`

    - #### mouseExited

          public void mouseExited(java.awt.event.MouseEvent e)

      Specified by:
        `mouseExited` in interface `java.awt.event.MouseListener`

    - #### mousePressed

          public void mousePressed(java.awt.event.MouseEvent e)

      Specified by:
        `mousePressed` in interface `java.awt.event.MouseListener`

    - #### mouseReleased

          public void mouseReleased(java.awt.event.MouseEvent e)

      Specified by:
        `mouseReleased` in interface `java.awt.event.MouseListener`

    - #### reset

          private void reset()

      Reset the main frame message bar text to its default.

    - #### set

          private void set(java.lang.Object ref)

      Set the main frame message bar text to this listener's specific rollover text.