# HG changeset patch # User Jaroslav Tulach # Date 1344459639 -7200 # Node ID 837ae5b09036ec055663ca2eab5a7384b6ffb0ca # Parent ee6bd6cf2bf32f2a693e42ae475f6d24c27ae392 Andrei: Show the EventSupport interface diff -r ee6bd6cf2bf3 -r 837ae5b09036 samples/openfixed/nbproject/build-impl.xml --- a/samples/openfixed/nbproject/build-impl.xml Wed Aug 08 22:42:33 2012 +0200 +++ b/samples/openfixed/nbproject/build-impl.xml Wed Aug 08 23:00:39 2012 +0200 @@ -12,18 +12,18 @@ - execution - debugging - javadoc - - junit compilation - - junit execution - - junit debugging + - test compilation + - test execution + - test debugging - applet - cleanup --> - + - + @@ -156,6 +156,7 @@ + @@ -198,7 +199,29 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -331,11 +354,52 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -344,32 +408,270 @@ - - - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -384,6 +686,7 @@ + @@ -400,10 +703,13 @@ - + Must set JVM to use for profiling in profiler.info.jvm Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + @@ -461,6 +767,7 @@ + @@ -477,6 +784,7 @@ + @@ -484,6 +792,7 @@ + @@ -510,11 +819,14 @@ + + + - + @@ -555,7 +867,7 @@ - + - + + + This target only works when run from inside the NetBeans IDE. @@ -779,8 +1095,9 @@ - + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. @@ -788,12 +1105,8 @@ - - + + This target only works when run from inside the NetBeans IDE. @@ -805,12 +1118,8 @@ - - + + This target only works when run from inside the NetBeans IDE. @@ -833,22 +1142,68 @@ + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + - + + + @@ -865,7 +1220,7 @@ @@ -908,14 +1263,14 @@ - + Some tests failed; see details above. @@ -928,39 +1283,40 @@ Must select some files in the IDE or set test.includes - + Some tests failed; see details above. + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + - + Must select one file in the IDE or set test.class - - - - - - - - - - - - - - - + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + @@ -1025,9 +1381,12 @@ - - - + + + + + + diff -r ee6bd6cf2bf3 -r 837ae5b09036 samples/openfixed/nbproject/genfiles.properties --- a/samples/openfixed/nbproject/genfiles.properties Wed Aug 08 22:42:33 2012 +0200 +++ b/samples/openfixed/nbproject/genfiles.properties Wed Aug 08 23:00:39 2012 +0200 @@ -4,5 +4,5 @@ # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=33b4766a -nbproject/build-impl.xml.script.CRC32=05841ecd -nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.0.45 +nbproject/build-impl.xml.script.CRC32=9666fd7c +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.54.0.46 diff -r ee6bd6cf2bf3 -r 837ae5b09036 samples/openfixed/src/org/apidesign/openfixed/AsyncEventSupport.java --- a/samples/openfixed/src/org/apidesign/openfixed/AsyncEventSupport.java Wed Aug 08 22:42:33 2012 +0200 +++ b/samples/openfixed/src/org/apidesign/openfixed/AsyncEventSupport.java Wed Aug 08 23:00:39 2012 +0200 @@ -4,6 +4,7 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.Executor; import java.util.concurrent.Executors; +import org.apidesign.openfixed.Calculator.EventSupport; /** * diff -r ee6bd6cf2bf3 -r 837ae5b09036 samples/openfixed/src/org/apidesign/openfixed/Calculator.java --- a/samples/openfixed/src/org/apidesign/openfixed/Calculator.java Wed Aug 08 22:42:33 2012 +0200 +++ b/samples/openfixed/src/org/apidesign/openfixed/Calculator.java Wed Aug 08 23:00:39 2012 +0200 @@ -13,6 +13,17 @@ private Calculator(EventSupport listeners) { this.listeners = listeners; } + + /** An abstraction over various types of event delivery + * to listeners. Comes with four different implementations. + * A trivial one, asynchronous one, one with support for + * pending events and one for a batch events delivery. + */ + interface EventSupport { + public void fireModificationEvent(ModificationEvent ev); + public void add(ModificationListener l); + public void remove(ModificationListener l); + } public static Calculator create() { return new Calculator(new TrivialEventSupport()); diff -r ee6bd6cf2bf3 -r 837ae5b09036 samples/openfixed/src/org/apidesign/openfixed/EventSupport.java --- a/samples/openfixed/src/org/apidesign/openfixed/EventSupport.java Wed Aug 08 22:42:33 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package org.apidesign.openfixed; - -/** - * - * @author Jaroslav Tulach - */ -interface EventSupport { - - public void fireModificationEvent(ModificationEvent ev); - - public void add(ModificationListener l); - - public void remove(ModificationListener l); - -} diff -r ee6bd6cf2bf3 -r 837ae5b09036 samples/openfixed/src/org/apidesign/openfixed/PendingEventSupport.java --- a/samples/openfixed/src/org/apidesign/openfixed/PendingEventSupport.java Wed Aug 08 22:42:33 2012 +0200 +++ b/samples/openfixed/src/org/apidesign/openfixed/PendingEventSupport.java Wed Aug 08 23:00:39 2012 +0200 @@ -4,6 +4,7 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.Executor; import java.util.concurrent.Executors; +import org.apidesign.openfixed.Calculator.EventSupport; /** * diff -r ee6bd6cf2bf3 -r 837ae5b09036 samples/openfixed/src/org/apidesign/openfixed/PostEventSupport.java --- a/samples/openfixed/src/org/apidesign/openfixed/PostEventSupport.java Wed Aug 08 22:42:33 2012 +0200 +++ b/samples/openfixed/src/org/apidesign/openfixed/PostEventSupport.java Wed Aug 08 23:00:39 2012 +0200 @@ -6,6 +6,7 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.Executor; import java.util.concurrent.Executors; +import org.apidesign.openfixed.Calculator.EventSupport; /** * diff -r ee6bd6cf2bf3 -r 837ae5b09036 samples/openfixed/src/org/apidesign/openfixed/TrivialEventSupport.java --- a/samples/openfixed/src/org/apidesign/openfixed/TrivialEventSupport.java Wed Aug 08 22:42:33 2012 +0200 +++ b/samples/openfixed/src/org/apidesign/openfixed/TrivialEventSupport.java Wed Aug 08 23:00:39 2012 +0200 @@ -6,6 +6,7 @@ import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; +import org.apidesign.openfixed.Calculator.EventSupport; /** *