FileDocCategorySizeDatePackage
Multiplier.javaAPI DocExample1025Sat Apr 23 22:35:42 BST 2005magicbeans

Multiplier

public class Multiplier extends Object implements Serializable

Fields Summary
private double
a
private double
b
private double
c
private PropertyChangeSupport
propChanges
Constructors Summary
Methods Summary
public voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)


	    
        propChanges.addPropertyChangeListener(listener);
    
public synchronized doublegetA()

 
		return a; 
	
public synchronized doublegetB()

 
		return b; 
	
public synchronized doublegetC()

 
		return c; 
	
private voidmultiply()

		double oldC = c;
		c = a * b;
		propChanges.firePropertyChange( 
			"C", new Double(oldC) , new Double(c) );
	
public voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)

        propChanges.removePropertyChangeListener(listener);
	
public synchronized voidsetA(double val)

 
		a = val; 
		multiply();
	
public synchronized voidsetB(double val)

 
		b = val; 
		multiply();
	
public synchronized voidsetC(double val)

 
		multiply();