javax.swing.plaf.basic

Class BasicButtonListener

public class BasicButtonListener extends Object implements MouseListener, MouseMotionListener, FocusListener, ChangeListener, PropertyChangeListener

Constructor Summary
BasicButtonListener(AbstractButton b)
Method Summary
protected voidcheckOpacity(AbstractButton b)
Checks the contentAreaFilled property and updates the opaque property of the button.
voidfocusGained(FocusEvent e)
voidfocusLost(FocusEvent e)
voidinstallKeyboardActions(JComponent c)
voidmouseClicked(MouseEvent e)
voidmouseDragged(MouseEvent e)
voidmouseEntered(MouseEvent e)
Accept a mouse enter event and set the button's "rollover" property to true, if the button's "rolloverEnabled" property is true.
voidmouseExited(MouseEvent e)
Accept a mouse exit event and set the button's model's "rollover" property to false, if it's "rolloverEnabled" property is true.
voidmouseMoved(MouseEvent e)
voidmousePressed(MouseEvent e)
Accept a mouse press event and arm the button.
voidmouseReleased(MouseEvent e)
Accept a mouse release event and set the button's "pressed" property to true, if the model is armed.
voidpropertyChange(PropertyChangeEvent e)
voidstateChanged(ChangeEvent e)
voiduninstallKeyboardActions(JComponent c)

Constructor Detail

BasicButtonListener

public BasicButtonListener(AbstractButton b)

Method Detail

checkOpacity

protected void checkOpacity(AbstractButton b)
Checks the contentAreaFilled property and updates the opaque property of the button.

Parameters: b the button to check

focusGained

public void focusGained(FocusEvent e)

focusLost

public void focusLost(FocusEvent e)

installKeyboardActions

public void installKeyboardActions(JComponent c)

mouseClicked

public void mouseClicked(MouseEvent e)

mouseDragged

public void mouseDragged(MouseEvent e)

mouseEntered

public void mouseEntered(MouseEvent e)
Accept a mouse enter event and set the button's "rollover" property to true, if the button's "rolloverEnabled" property is true. If the button is currently armed and the mouse button is not held down, this enter event will also disarm the model.

Parameters: e The mouse enter event to accept

mouseExited

public void mouseExited(MouseEvent e)
Accept a mouse exit event and set the button's model's "rollover" property to false, if it's "rolloverEnabled" property is true. Also disarm the button.

Parameters: e The mouse exit event to accept

mouseMoved

public void mouseMoved(MouseEvent e)

mousePressed

public void mousePressed(MouseEvent e)
Accept a mouse press event and arm the button.

Parameters: e The mouse press event to accept

mouseReleased

public void mouseReleased(MouseEvent e)
Accept a mouse release event and set the button's "pressed" property to true, if the model is armed. If the model is not armed, ignore the event.

Parameters: e The mouse release event to accept

propertyChange

public void propertyChange(PropertyChangeEvent e)

stateChanged

public void stateChanged(ChangeEvent e)

uninstallKeyboardActions

public void uninstallKeyboardActions(JComponent c)