OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 156 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 156 Rev 177
Line 45... Line 45...
45
import java.util.LinkedList;
45
import java.util.LinkedList;
46
import java.util.List;
46
import java.util.List;
47
import java.util.Timer;
47
import java.util.Timer;
48
import java.util.TimerTask;
48
import java.util.TimerTask;
49
import java.util.concurrent.Future;
49
import java.util.concurrent.Future;
50
import java.util.concurrent.FutureTask;
50
import java.util.concurrent.RunnableFuture;
51
import java.util.concurrent.TimeUnit;
51
import java.util.concurrent.TimeUnit;
52
import java.util.concurrent.TimeoutException;
52
import java.util.concurrent.TimeoutException;
53
import java.util.concurrent.atomic.AtomicInteger;
53
import java.util.concurrent.atomic.AtomicInteger;
54
import java.util.logging.Level;
54
import java.util.logging.Level;
55
 
55
 
Line 196... Line 196...
196
        this.loading = false;
196
        this.loading = false;
197
        this.updateQ.addPropertyChangeListener(new PropertyChangeListener() {
197
        this.updateQ.addPropertyChangeListener(new PropertyChangeListener() {
198
            @Override
198
            @Override
199
            public void propertyChange(final PropertyChangeEvent evt) {
199
            public void propertyChange(final PropertyChangeEvent evt) {
200
                if (evt.getPropertyName().equals("beingRun")) {
200
                if (evt.getPropertyName().equals("beingRun")) {
201
                    final boolean isLoading = UpdateQueue.isUpdate((FutureTask<?>) evt.getNewValue());
201
                    final boolean isLoading = UpdateQueue.isUpdate((RunnableFuture<?>) evt.getNewValue());
202
                    SwingUtilities.invokeLater(new Runnable() {
202
                    SwingUtilities.invokeLater(new Runnable() {
203
                        @Override
203
                        @Override
204
                        public void run() {
204
                        public void run() {
205
                            setLoading(isLoading);
205
                            setLoading(isLoading);
206
                        }
206
                        }
Line 220... Line 220...
220
        this.searching = false;
220
        this.searching = false;
221
        this.searchQ.addPropertyChangeListener(new PropertyChangeListener() {
221
        this.searchQ.addPropertyChangeListener(new PropertyChangeListener() {
222
            @Override
222
            @Override
223
            public void propertyChange(PropertyChangeEvent evt) {
223
            public void propertyChange(PropertyChangeEvent evt) {
224
                if (evt.getPropertyName().equals("beingRun")) {
224
                if (evt.getPropertyName().equals("beingRun")) {
225
                    final boolean isSearching = SearchQueue.isSearch((FutureTask<?>) evt.getNewValue());
225
                    final boolean isSearching = SearchQueue.isSearch((RunnableFuture<?>) evt.getNewValue());
226
                    SwingUtilities.invokeLater(new Runnable() {
226
                    SwingUtilities.invokeLater(new Runnable() {
227
                        @Override
227
                        @Override
228
                        public void run() {
228
                        public void run() {
229
                            setSearching(isSearching);
229
                            setSearching(isSearching);
230
                        }
230
                        }