public abstract class MouseOverListener extends MouseAdapter implements ContainerListener
Component and the children of the same component
to find out whether the mouse is over the base component. This also works if
the children of the base component do not let MouseEvents through.| Constructor and Description |
|---|
MouseOverListener(Component parent)
Creates a new listener
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
added(Component component)
Adds listeners to
component and its children. |
protected abstract void |
changed()
Called whenever the mouse-over state changed.
|
void |
componentAdded(ContainerEvent e) |
void |
componentRemoved(ContainerEvent e) |
boolean |
isMouseOver()
Tells whether the mouse is currently over the base component.
|
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
protected void |
removed(Component component)
Removes listeners from
component and its children. |
mouseClicked, mouseDragged, mouseMoved, mousePressed, mouseReleased, mouseWheelMovedpublic MouseOverListener(Component parent)
parent - the component to observepublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenermouseEntered in class MouseAdapterpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenermouseExited in class MouseAdapterprotected abstract void changed()
public boolean isMouseOver()
true if the mouse is within the borders of the
base componentpublic void componentAdded(ContainerEvent e)
componentAdded in interface ContainerListenerprotected void added(Component component)
component and its children.component - the new component to observepublic void componentRemoved(ContainerEvent e)
componentRemoved in interface ContainerListenerprotected void removed(Component component)
component and its children.component - the component which should no longer be observedCopyright © 2017 Docking Frames. All rights reserved.