KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > javax > swing > AbstractButton.ButtonChangeListener

javax.swing
Class AbstractButton.ButtonChangeListener

java.lang.Object
  extended by javax.swing.AbstractButton.ButtonChangeListener
All Implemented Interfaces:
Serializable, EventListener, ChangeListener
Enclosing class:
AbstractButton
See Also:
Source Code, XMLEncoder

public void stateChanged(ChangeEvent e)
See Also:
ChangeListener
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[108]Notify all ButtonActionListeners of change events
By Anonymous on 2002/10/18 18:42:15  Rate
//Add button Model 
  
  
   if  ( this.buttonmodel != null )  
    {  
    buttonchangelistener = new ButtonChangeListener (  ) ; 
    buttonactionlistener = new ButtonActionListener (  ) ; 
  
  
    this.buttonmodel.addChangeListener ( buttonchangelistener ) ; 
    this.buttonmodel.addActionListener ( buttonactionlistener ) ; 
    }  
  
  
 ... 
  
  
  
  
 //Button Model class 
  
  
 protected void fireChangeEvent ( ChangeEvent changeevent )  
  {  
   Enumeration enumeration = vectorChangeListeners.elements (  ) ; 
  
  
   while  ( enumeration.hasMoreElements (  )  )  
    {  
    ChangeListener changelistener = 
      ( ChangeListener ) enumeration.nextElement (  ) ; 
  
  
    changelistener.stateChanged ( changeevent ) ; 
    }  
  }  
 

Popular Tags