FileDocCategorySizeDatePackage
Multiplier.javaAPI DocExample1011Mon May 01 14:42:08 BST 2000magicbeans

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