FileDocCategorySizeDatePackage
Multiplier.javaAPI DocExample945Wed Jun 25 00:11:06 BST 1997magicbeans

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();