com.alee.utils.swing
Class ConditionalVisibilityListener
java.lang.Object
com.alee.utils.swing.ConditionalVisibilityListener
- All Implemented Interfaces:
- java.awt.event.FocusListener, java.awt.event.MouseListener, java.util.EventListener
public class ConditionalVisibilityListener
- extends java.lang.Object
- implements java.awt.event.FocusListener, java.awt.event.MouseListener
This listener allows a quick creation of component visibility change action on any focus changes. You can also invert the way visibility
changes on focus change.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConditionalVisibilityListener
public ConditionalVisibilityListener(java.awt.Component component)
ConditionalVisibilityListener
public ConditionalVisibilityListener(java.awt.Component component,
java.lang.Boolean focusedVisible,
java.lang.Boolean mouseoverVisible)
install
public static void install(java.awt.Component tracked,
java.awt.Component component,
java.lang.Boolean focusedVisible,
java.lang.Boolean mouseoverVisible)
getFocusedVisible
public java.lang.Boolean getFocusedVisible()
setFocusedVisible
public void setFocusedVisible(java.lang.Boolean focusedVisible)
getMouseoverVisible
public java.lang.Boolean getMouseoverVisible()
setMouseoverVisible
public void setMouseoverVisible(java.lang.Boolean mouseoverVisible)
getComponent
public java.awt.Component getComponent()
setComponent
public void setComponent(java.awt.Component component)
focusGained
public void focusGained(java.awt.event.FocusEvent e)
- Specified by:
focusGained
in interface java.awt.event.FocusListener
focusLost
public void focusLost(java.awt.event.FocusEvent e)
- Specified by:
focusLost
in interface java.awt.event.FocusListener
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked
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
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
updateVisibility
public void updateVisibility()
isVisible
public boolean isVisible()