Lines Matching defs:eventCount
90 final AtomicInteger eventCount = new AtomicInteger(0);
91 final MouseAdapter adapter = new MouseEventAdapter(eventCount, EXPECTED_EVENT_COUNT);
104 waitForCondition(eventCount, EXPECTED_EVENT_COUNT, TIMEOUT);
106 if (eventCount.get() != EXPECTED_EVENT_COUNT) {
108 eventCount.get() + ", expected: " + EXPECTED_EVENT_COUNT);
125 final AtomicInteger eventCount = new AtomicInteger(0);
126 final MouseAdapter adapter = new MouseEventAdapter(eventCount, EXPECTED_EVENT_COUNT);
141 waitForCondition(eventCount, EXPECTED_EVENT_COUNT, TIMEOUT);
143 if (eventCount.get() != EXPECTED_EVENT_COUNT) {
145 eventCount.get() + ", expected: " + EXPECTED_EVENT_COUNT);
153 private static void waitForCondition(final AtomicInteger eventCount, int EXPECTED_EVENT_COUNT,
156 synchronized (eventCount) {
157 if (eventCount.get() != EXPECTED_EVENT_COUNT) {
159 eventCount.wait(timeout);
172 private final AtomicInteger eventCount;
174 public MouseEventAdapter(final AtomicInteger eventCount, final int EXPECTED_EVENT_COUNT) {
176 this.eventCount = eventCount;
181 synchronized (eventCount) {
182 if (eventCount.incrementAndGet() == EXPECTED_EVENT_COUNT) {
183 eventCount.notifyAll();