adavid.swing
Class FocusableBorder

java.lang.Object
  |
  +--adavid.swing.FocusableBorder

public class FocusableBorder
extends java.lang.Object
implements java.awt.event.MouseListener, javax.swing.event.ChangeListener, java.awt.event.MouseMotionListener


Constructor Summary
FocusableBorder()
           
 
Method Summary
static void add(javax.swing.AbstractButton button)
          add a button to be monitored
 void mouseClicked(java.awt.event.MouseEvent e)
          useless methods of listeners
 void mouseDragged(java.awt.event.MouseEvent e)
          to correct when the mouse is dragged out/in
 void mouseEntered(java.awt.event.MouseEvent e)
          show the border if the button is enabled
 void mouseExited(java.awt.event.MouseEvent e)
          hide the border
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
          to correct the set false if it not selected and we press or release the button
static void remove(javax.swing.AbstractButton button)
          remove a button (remove the instance from the button's listener list)
 void stateChanged(javax.swing.event.ChangeEvent e)
          if the state changes, then an update may be needed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FocusableBorder

public FocusableBorder()
Method Detail

add

public static void add(javax.swing.AbstractButton button)
add a button to be monitored

remove

public static void remove(javax.swing.AbstractButton button)
remove a button (remove the instance from the button's listener list)

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
show the border if the button is enabled
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
hide the border
Specified by:
mouseExited in interface java.awt.event.MouseListener

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
if the state changes, then an update may be needed
Specified by:
stateChanged in interface javax.swing.event.ChangeListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
to correct the set false if it not selected and we press or release the button
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
to correct when the mouse is dragged out/in
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
useless methods of listeners
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener