org.jfree.ui

## Class FloatingButtonEnabler

- java.lang.Object
- - java.awt.event.MouseAdapter
  - - org.jfree.ui.FloatingButtonEnabler

- All Implemented Interfaces:
    java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener

      public final class FloatingButtonEnabler
      extends java.awt.event.MouseAdapter

  Enables a button to have a simple floating effect. The border of the button is only visible, when the mouse pointer is floating over the button.
  Author:
    Thomas Morgner

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addButton(javax.swing.AbstractButton button)` Adds a button to this enabler.
    `static FloatingButtonEnabler` | `getInstance()` Returns a default instance of this enabler.
    `void` | `mouseEntered(java.awt.event.MouseEvent e)` Triggers the drawing of the border when the mouse entered the button area.
    `void` | `mouseExited(java.awt.event.MouseEvent e)` Disables the drawing of the border when the mouse leaves the button area.
    `void` | `removeButton(javax.swing.AbstractButton button)` Removes a button from the enabler.

    - ### Methods inherited from class java.awt.event.MouseAdapter

      `mouseClicked, mouseDragged, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved`

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

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

- - ### Method Detail

    - #### getInstance

          public static FloatingButtonEnabler getInstance()

      Returns a default instance of this enabler.
      Returns:
        a shared instance of this class.

    - #### addButton

          public void addButton(javax.swing.AbstractButton button)

      Adds a button to this enabler.
      Parameters:
        `button` - the button.

    - #### removeButton

          public void removeButton(javax.swing.AbstractButton button)

      Removes a button from the enabler.
      Parameters:
        `button` - the button.

    - #### mouseEntered

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

      Triggers the drawing of the border when the mouse entered the button area.
      Specified by:
        `mouseEntered` in interface `java.awt.event.MouseListener`
      Overrides:
        `mouseEntered` in class `java.awt.event.MouseAdapter`
      Parameters:
        `e` - the mouse event.

    - #### mouseExited

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

      Disables the drawing of the border when the mouse leaves the button area.
      Specified by:
        `mouseExited` in interface `java.awt.event.MouseListener`
      Overrides:
        `mouseExited` in class `java.awt.event.MouseAdapter`
      Parameters:
        `e` - the mouse event.