Class BasicCommandButtonListener
- java.lang.Object
-
- org.pushingpixels.radiance.component.internal.ui.common.BasicCommandButtonListener
-
- All Implemented Interfaces:
java.awt.event.FocusListener
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.util.EventListener
,javax.swing.event.ChangeListener
public class BasicCommandButtonListener extends java.lang.Object implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.FocusListener, javax.swing.event.ChangeListener
Listener to track user interaction with the command buttons.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
BasicCommandButtonListener.ButtonAction
private static class
BasicCommandButtonListener.FocusDownAction
private static class
BasicCommandButtonListener.FocusEndAction
private static class
BasicCommandButtonListener.FocusHomeAction
private static class
BasicCommandButtonListener.FocusLeftAction
private static class
BasicCommandButtonListener.FocusRightAction
private static class
BasicCommandButtonListener.FocusTraversalAction
private static class
BasicCommandButtonListener.FocusUpAction
private static class
BasicCommandButtonListener.PopupDismissAction
private static class
BasicCommandButtonListener.PopupToggleAction
private static class
BasicCommandButtonListener.PressAction
private static class
BasicCommandButtonListener.ReleaseAction
-
Constructor Summary
Constructors Constructor Description BasicCommandButtonListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
focusGained(java.awt.event.FocusEvent e)
void
focusLost(java.awt.event.FocusEvent e)
void
installKeyboardActions(JCommandButton button)
Installs keyboard action (space / enter keys) on the specified command button.void
mouseClicked(java.awt.event.MouseEvent e)
void
mouseDragged(java.awt.event.MouseEvent e)
void
mouseEntered(java.awt.event.MouseEvent e)
void
mouseExited(java.awt.event.MouseEvent e)
void
mouseMoved(java.awt.event.MouseEvent e)
void
mousePressed(java.awt.event.MouseEvent e)
void
mouseReleased(java.awt.event.MouseEvent e)
void
stateChanged(javax.swing.event.ChangeEvent e)
private void
syncMouseMovement(java.awt.event.MouseEvent e)
Synchronizes the action and popup models of the command button with the specified mouse event.void
uninstallKeyboardActions(JCommandButton button)
Uninstalls keyboard action from the specified command button.
-
-
-
Method Detail
-
focusLost
public void focusLost(java.awt.event.FocusEvent e)
- Specified by:
focusLost
in interfacejava.awt.event.FocusListener
-
focusGained
public void focusGained(java.awt.event.FocusEvent e)
- Specified by:
focusGained
in interfacejava.awt.event.FocusListener
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMoved
in interfacejava.awt.event.MouseMotionListener
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
-
syncMouseMovement
private void syncMouseMovement(java.awt.event.MouseEvent e)
Synchronizes the action and popup models of the command button with the specified mouse event.- Parameters:
e
- Mouse event for the model synchronization.
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
-
installKeyboardActions
public void installKeyboardActions(JCommandButton button)
Installs keyboard action (space / enter keys) on the specified command button.- Parameters:
button
- Command button.
-
uninstallKeyboardActions
public void uninstallKeyboardActions(JCommandButton button)
Uninstalls keyboard action from the specified command button.- Parameters:
button
- Command button.
-
-