VCS: asynch load of committed changes when do "Browse changes"
[fedora-idea.git] / platform / vcs-api / src / com / intellij / openapi / vcs / changes / committed / ChangeListFilteringStrategy.java
blob430b4ccb35de97c0a5178580f2cdbd44f2822ded
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.intellij.openapi.vcs.changes.committed;
18 import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList;
19 import org.jetbrains.annotations.NotNull;
20 import org.jetbrains.annotations.Nullable;
22 import javax.swing.*;
23 import javax.swing.event.ChangeListener;
24 import java.util.List;
26 /**
27 * @author yole
29 public interface ChangeListFilteringStrategy {
30 @Nullable
31 JComponent getFilterUI();
32 void setFilterBase(List<CommittedChangeList> changeLists);
33 void addChangeListener(ChangeListener listener);
34 void removeChangeListener(ChangeListener listener);
36 @Nullable
37 void resetFilterBase();
38 void appendFilterBase(List<CommittedChangeList> changeLists);
40 @NotNull
41 List<CommittedChangeList> filterChangeLists(List<CommittedChangeList> changeLists);
43 ChangeListFilteringStrategy NONE = new ChangeListFilteringStrategy() {
44 public String toString() {
45 return "None";
48 @Nullable
49 public JComponent getFilterUI() {
50 return null;
53 public void setFilterBase(List<CommittedChangeList> changeLists) {
56 public void addChangeListener(ChangeListener listener) {
59 public void removeChangeListener(ChangeListener listener) {
62 @Nullable
63 public void resetFilterBase() {
66 public void appendFilterBase(List<CommittedChangeList> changeLists) {
69 @NotNull
70 public List<CommittedChangeList> filterChangeLists(List<CommittedChangeList> changeLists) {
71 return changeLists;