javax.swing.plaf.basic
Class BasicButtonListener

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.basic.BasicButtonListener
All Implemented Interfaces:
FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener , MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener , MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener , PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener , EventListener sample code for java.util.EventListener definition code for java.util.EventListener , ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener

public class BasicButtonListener
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener , MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener , FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener , ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener , PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener

Button Listener


Constructor Summary
BasicButtonListener sample code for javax.swing.plaf.basic.BasicButtonListener.BasicButtonListener(javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonListener.BasicButtonListener(javax.swing.AbstractButton) (AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)
           
 
Method Summary
protected  void checkOpacity sample code for javax.swing.plaf.basic.BasicButtonListener.checkOpacity(javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonListener.checkOpacity(javax.swing.AbstractButton) (AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)
           
 void focusGained sample code for javax.swing.plaf.basic.BasicButtonListener.focusGained(java.awt.event.FocusEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.focusGained(java.awt.event.FocusEvent) (FocusEvent sample code for java.awt.event.FocusEvent definition code for java.awt.event.FocusEvent  e)
          Invoked when a component gains the keyboard focus.
 void focusLost sample code for javax.swing.plaf.basic.BasicButtonListener.focusLost(java.awt.event.FocusEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.focusLost(java.awt.event.FocusEvent) (FocusEvent sample code for java.awt.event.FocusEvent definition code for java.awt.event.FocusEvent  e)
          Invoked when a component loses the keyboard focus.
 void installKeyboardActions sample code for javax.swing.plaf.basic.BasicButtonListener.installKeyboardActions(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicButtonListener.installKeyboardActions(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Register default key actions: pressing space to "click" a button and registring the keyboard mnemonic (if any).
 void mouseClicked sample code for javax.swing.plaf.basic.BasicButtonListener.mouseClicked(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mouseClicked(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when the mouse button has been clicked (pressed and released) on a component.
 void mouseDragged sample code for javax.swing.plaf.basic.BasicButtonListener.mouseDragged(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mouseDragged(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when a mouse button is pressed on a component and then dragged.
 void mouseEntered sample code for javax.swing.plaf.basic.BasicButtonListener.mouseEntered(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mouseEntered(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when the mouse enters a component.
 void mouseExited sample code for javax.swing.plaf.basic.BasicButtonListener.mouseExited(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mouseExited(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when the mouse exits a component.
 void mouseMoved sample code for javax.swing.plaf.basic.BasicButtonListener.mouseMoved(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mouseMoved(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.
 void mousePressed sample code for javax.swing.plaf.basic.BasicButtonListener.mousePressed(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mousePressed(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when a mouse button has been pressed on a component.
 void mouseReleased sample code for javax.swing.plaf.basic.BasicButtonListener.mouseReleased(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mouseReleased(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when a mouse button has been released on a component.
 void propertyChange sample code for javax.swing.plaf.basic.BasicButtonListener.propertyChange(java.beans.PropertyChangeEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.propertyChange(java.beans.PropertyChangeEvent) (PropertyChangeEvent sample code for java.beans.PropertyChangeEvent definition code for java.beans.PropertyChangeEvent  e)
          This method gets called when a bound property is changed.
 void stateChanged sample code for javax.swing.plaf.basic.BasicButtonListener.stateChanged(javax.swing.event.ChangeEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.stateChanged(javax.swing.event.ChangeEvent) (ChangeEvent sample code for javax.swing.event.ChangeEvent definition code for javax.swing.event.ChangeEvent  e)
          Invoked when the target of the listener has changed its state.
 void uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicButtonListener.uninstallKeyboardActions(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicButtonListener.uninstallKeyboardActions(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Unregister's default key actions
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

BasicButtonListener sample code for javax.swing.plaf.basic.BasicButtonListener(javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonListener(javax.swing.AbstractButton)

public BasicButtonListener(AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)
Method Detail

propertyChange sample code for javax.swing.plaf.basic.BasicButtonListener.propertyChange(java.beans.PropertyChangeEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.propertyChange(java.beans.PropertyChangeEvent)

public void propertyChange(PropertyChangeEvent sample code for java.beans.PropertyChangeEvent definition code for java.beans.PropertyChangeEvent  e)
Description copied from interface: PropertyChangeListener sample code for java.beans.PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent) definition code for java.beans.PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
This method gets called when a bound property is changed.

Specified by:
propertyChange sample code for java.beans.PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent) definition code for java.beans.PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent) in interface PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener
Parameters:
e - A PropertyChangeEvent object describing the event source and the property that has changed.

checkOpacity sample code for javax.swing.plaf.basic.BasicButtonListener.checkOpacity(javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonListener.checkOpacity(javax.swing.AbstractButton)

protected void checkOpacity(AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)

installKeyboardActions sample code for javax.swing.plaf.basic.BasicButtonListener.installKeyboardActions(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicButtonListener.installKeyboardActions(javax.swing.JComponent)

public void installKeyboardActions(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Register default key actions: pressing space to "click" a button and registring the keyboard mnemonic (if any).


uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicButtonListener.uninstallKeyboardActions(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicButtonListener.uninstallKeyboardActions(javax.swing.JComponent)

public void uninstallKeyboardActions(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Unregister's default key actions


stateChanged sample code for javax.swing.plaf.basic.BasicButtonListener.stateChanged(javax.swing.event.ChangeEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.stateChanged(javax.swing.event.ChangeEvent)

public void stateChanged(ChangeEvent sample code for javax.swing.event.ChangeEvent definition code for javax.swing.event.ChangeEvent  e)
Description copied from interface: ChangeListener sample code for javax.swing.event.ChangeListener.stateChanged(javax.swing.event.ChangeEvent) definition code for javax.swing.event.ChangeListener.stateChanged(javax.swing.event.ChangeEvent)
Invoked when the target of the listener has changed its state.

Specified by:
stateChanged sample code for javax.swing.event.ChangeListener.stateChanged(javax.swing.event.ChangeEvent) definition code for javax.swing.event.ChangeListener.stateChanged(javax.swing.event.ChangeEvent) in interface ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener
Parameters:
e - a ChangeEvent object

focusGained sample code for javax.swing.plaf.basic.BasicButtonListener.focusGained(java.awt.event.FocusEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.focusGained(java.awt.event.FocusEvent)

public void focusGained(FocusEvent sample code for java.awt.event.FocusEvent definition code for java.awt.event.FocusEvent  e)
Description copied from interface: FocusListener sample code for java.awt.event.FocusListener.focusGained(java.awt.event.FocusEvent) definition code for java.awt.event.FocusListener.focusGained(java.awt.event.FocusEvent)
Invoked when a component gains the keyboard focus.

Specified by:
focusGained sample code for java.awt.event.FocusListener.focusGained(java.awt.event.FocusEvent) definition code for java.awt.event.FocusListener.focusGained(java.awt.event.FocusEvent) in interface FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener

focusLost sample code for javax.swing.plaf.basic.BasicButtonListener.focusLost(java.awt.event.FocusEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.focusLost(java.awt.event.FocusEvent)

public void focusLost(FocusEvent sample code for java.awt.event.FocusEvent definition code for java.awt.event.FocusEvent  e)
Description copied from interface: FocusListener sample code for java.awt.event.FocusListener.focusLost(java.awt.event.FocusEvent) definition code for java.awt.event.FocusListener.focusLost(java.awt.event.FocusEvent)
Invoked when a component loses the keyboard focus.

Specified by:
focusLost sample code for java.awt.event.FocusListener.focusLost(java.awt.event.FocusEvent) definition code for java.awt.event.FocusListener.focusLost(java.awt.event.FocusEvent) in interface FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener

mouseMoved sample code for javax.swing.plaf.basic.BasicButtonListener.mouseMoved(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mouseMoved(java.awt.event.MouseEvent)

public void mouseMoved(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Description copied from interface: MouseMotionListener sample code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.

Specified by:
mouseMoved sample code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent) in interface MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener

mouseDragged sample code for javax.swing.plaf.basic.BasicButtonListener.mouseDragged(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mouseDragged(java.awt.event.MouseEvent)

public void mouseDragged(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Description copied from interface: MouseMotionListener sample code for java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)
Invoked when a mouse button is pressed on a component and then dragged. MOUSE_DRAGGED events will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).

Due to platform-dependent Drag&Drop implementations, MOUSE_DRAGGED events may not be delivered during a native Drag&Drop operation.

Specified by:
mouseDragged sample code for java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent) in interface MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener

mouseClicked sample code for javax.swing.plaf.basic.BasicButtonListener.mouseClicked(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mouseClicked(java.awt.event.MouseEvent)

public void mouseClicked(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Description copied from interface: MouseListener sample code for java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent)
Invoked when the mouse button has been clicked (pressed and released) on a component.

Specified by:
mouseClicked sample code for java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener

mousePressed sample code for javax.swing.plaf.basic.BasicButtonListener.mousePressed(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mousePressed(java.awt.event.MouseEvent)

public void mousePressed(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Description copied from interface: MouseListener sample code for java.awt.event.MouseListener.mousePressed(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mousePressed(java.awt.event.MouseEvent)
Invoked when a mouse button has been pressed on a component.

Specified by:
mousePressed sample code for java.awt.event.MouseListener.mousePressed(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mousePressed(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener

mouseReleased sample code for javax.swing.plaf.basic.BasicButtonListener.mouseReleased(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mouseReleased(java.awt.event.MouseEvent)

public void mouseReleased(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Description copied from interface: MouseListener sample code for java.awt.event.MouseListener.mouseReleased(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseReleased(java.awt.event.MouseEvent)
Invoked when a mouse button has been released on a component.

Specified by:
mouseReleased sample code for java.awt.event.MouseListener.mouseReleased(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseReleased(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener

mouseEntered sample code for javax.swing.plaf.basic.BasicButtonListener.mouseEntered(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mouseEntered(java.awt.event.MouseEvent)

public void mouseEntered(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Description copied from interface: MouseListener sample code for java.awt.event.MouseListener.mouseEntered(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseEntered(java.awt.event.MouseEvent)
Invoked when the mouse enters a component.

Specified by:
mouseEntered sample code for java.awt.event.MouseListener.mouseEntered(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseEntered(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener

mouseExited sample code for javax.swing.plaf.basic.BasicButtonListener.mouseExited(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicButtonListener.mouseExited(java.awt.event.MouseEvent)

public void mouseExited(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Description copied from interface: MouseListener sample code for java.awt.event.MouseListener.mouseExited(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseExited(java.awt.event.MouseEvent)
Invoked when the mouse exits a component.

Specified by:
mouseExited sample code for java.awt.event.MouseListener.mouseExited(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseExited(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener