package com.kovaciny.primexmodel;

public class PrimexModel {

}

@@ -34,36 +34,1034 @@
 %0D%0A%0D%0A
-public class PrimexModel %7B%0D%0A
+import java.beans.PropertyChangeListener;%0D%0Aimport java.beans.PropertyChangeSupport;%0D%0A%0D%0Apublic class PrimexModel %7B%0D%0A%09// Create PropertyChangeSupport to manage listeners and fire events.%0D%0A%09  private final PropertyChangeSupport propChangeSupport = new PropertyChangeSupport(this);%0D%0A%09  private int foo;%0D%0A%09  %0D%0A%09  // Provide delegating methods to add / remove listeners to / from the support class.  %0D%0A%09  public void addPropertyChangeListener(PropertyChangeListener l) %7B%0D%0A%09    propChangeSupport.addPropertyChangeListener(l);%0D%0A%09  %7D%0D%0A%0D%0A%09  public void removePropertyChangeListener(PropertyChangeListener l) %7B%0D%0A%09    propChangeSupport.removePropertyChangeListener(l);%0D%0A%09  %7D%0D%0A%0D%0A%09  // Simple example of how to fire an event when the value of 'foo' is changed.%0D%0A%09  protected void setFoo(int foo) %7B%0D%0A%09    if (this.foo != foo) %7B%0D%0A%09      // Remember previous value, assign new value and then fire event.%0D%0A%09      int oldFoo = this.foo;%0D%0A%09      this.foo = foo;%0D%0A%09      propChangeSupport.firePropertyChange(%22foo%22, oldFoo, this.foo);%0D%0A%09    %7D%0D%0A%09  %7D
 %0D%0A%7D%0D

Create Model class