public abstract class ListItemHoverBehavior extends AbstractObjectHoverBehavior<javax.swing.JList,java.lang.Object>
JList items.
To install this behavior you will need to add it as MouseListener, MouseMotionListener and
ComponentListener into the list, otherwise it will not function properly.
It uses mouse enter/exit/move events and component resized/moved/shown/hidden events to track hover index. It might seem excessive, but simple move listener does not cover whole variety of possible cases when hover index can be changed.
component, enabledOnly, hoverObject| Constructor and Description |
|---|
ListItemHoverBehavior(javax.swing.JList list)
Constructs behavior for the specified list.
|
ListItemHoverBehavior(javax.swing.JList list,
boolean enabledOnly)
Constructs behavior for the specified list.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
getObjectAt(java.awt.Point point)
Returns object at the specified point.
|
checkHoverChange, clearHover, componentHidden, componentMoved, componentResized, componentShown, hoverChanged, install, isEnabledOnly, mouseDragged, mouseEntered, mouseExited, mouseMoved, setEnabledOnly, uninstall, updateHover, updateHover, updateHoverpublic ListItemHoverBehavior(javax.swing.JList list)
list - list into which this behavior is installedpublic ListItemHoverBehavior(javax.swing.JList list,
boolean enabledOnly)
list - list into which this behavior is installedenabledOnly - whether or not behavior should only track hover events when list is enabledprotected java.lang.Object getObjectAt(java.awt.Point point)
AbstractObjectHoverBehaviorgetObjectAt in class AbstractObjectHoverBehavior<javax.swing.JList,java.lang.Object>point - hover point