1.1 --- a/samples/openfixed/src/org/apidesign/openfixed/Calculator.java Sun Mar 20 20:52:33 2011 +0100
1.2 +++ b/samples/openfixed/src/org/apidesign/openfixed/Calculator.java Wed Aug 08 23:00:39 2012 +0200
1.3 @@ -13,6 +13,17 @@
1.4 private Calculator(EventSupport listeners) {
1.5 this.listeners = listeners;
1.6 }
1.7 +
1.8 + /** An abstraction over various types of event delivery
1.9 + * to listeners. Comes with four different implementations.
1.10 + * A trivial one, asynchronous one, one with support for
1.11 + * pending events and one for a batch events delivery.
1.12 + */
1.13 + interface EventSupport {
1.14 + public void fireModificationEvent(ModificationEvent ev);
1.15 + public void add(ModificationListener l);
1.16 + public void remove(ModificationListener l);
1.17 + }
1.18
1.19 public static Calculator create() {
1.20 return new Calculator(new TrivialEventSupport());