Bug 126839 [DataBinding] IObservable refactoring
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WorkQueue.java
/*******************************************************************************
 * Licensed Materials - Property of IBM
 * (c) Copyright IBM Corporation 2005-2006. All Rights Reserved. 
 * 
 * Note to U.S. Government Users Restricted Rights:  Use, 
 * duplication or disclosure restricted by GSA ADP Schedule 
 * Contract with IBM Corp.
 *******************************************************************************/
package org.eclipse.jface.internal.databinding.swt;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Set;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
public class WorkQueue {
    private boolean updateScheduled = false;
    private boolean paintListenerAttached = false;
    private LinkedList pendingWork = new LinkedList();
    private Display d;
    private Set pendingWorkSet = new HashSet();
    private Runnable updateJob = new Runnable() {
        public void run() {
            doUpdate();
            updateScheduled = false;
        }
    };
    private Listener paintListener = new Listener() {