OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 112 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 112 Rev 150
Line 4... Line 4...
4
import java.util.ArrayList;
4
import java.util.ArrayList;
5
import java.util.Calendar;
5
import java.util.Calendar;
6
import java.util.Collections;
6
import java.util.Collections;
7
import java.util.Date;
7
import java.util.Date;
8
import java.util.List;
8
import java.util.List;
-
 
9
import java.util.Objects;
9
 
10
 
10
import javax.swing.SwingUtilities;
11
import javax.swing.SwingUtilities;
11
import javax.swing.SwingWorker;
12
import javax.swing.SwingWorker;
12
 
13
 
13
import org.jopencalendar.model.Flag;
14
import org.jopencalendar.model.Flag;
Line 117... Line 118...
117
 
118
 
118
    public void setFilter(List<User> users, List<String> states, boolean hideLocked, boolean hideUnlocked) {
119
    public void setFilter(List<User> users, List<String> states, boolean hideLocked, boolean hideUnlocked) {
119
        if (!SwingUtilities.isEventDispatchThread()) {
120
        if (!SwingUtilities.isEventDispatchThread()) {
120
            throw new IllegalStateException();
121
            throw new IllegalStateException();
121
        }
122
        }
-
 
123
        boolean changed = false;
-
 
124
        if (!Objects.equals(this.filterUsers, users)) {
122
        this.filterUsers = users;
125
            this.filterUsers = users;
-
 
126
            changed = true;
-
 
127
        }
-
 
128
        if (!Objects.equals(this.filterStates, states)) {
123
        this.filterStates = states;
129
            this.filterStates = states;
-
 
130
            changed = true;
-
 
131
        }
-
 
132
        if (this.hideLocked != hideLocked) {
124
        this.hideLocked = hideLocked;
133
            this.hideLocked = hideLocked;
-
 
134
            changed = true;
-
 
135
        }
-
 
136
        if (this.hideUnlocked != hideUnlocked) {
125
        this.hideUnlocked = hideUnlocked;
137
            this.hideUnlocked = hideUnlocked;
-
 
138
            changed = true;
-
 
139
        }
-
 
140
        if (changed)
126
        reload();
141
            reload();
127
    }
142
    }
128
 
143
 
129
    public Date getDate() {
144
    public Date getDate() {
130
        return new Date(date.getTime());
145
        return new Date(date.getTime());