summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshawn.f.cook2011-10-27 16:40:05 (EDT)
committer Roberto E. Escobar2011-10-27 16:40:05 (EDT)
commitc6d7bf058045259a6feffa9d5651d123b16c4b88 (patch)
treee1f8f2ceeeb05a17d07b658b010101f2f422807c
parent76e53c034be6af83a246976158dc4c01551df5a3 (diff)
downloadorg.eclipse.osee-c6d7bf058045259a6feffa9d5651d123b16c4b88.zip
org.eclipse.osee-c6d7bf058045259a6feffa9d5651d123b16c4b88.tar.gz
org.eclipse.osee-c6d7bf058045259a6feffa9d5651d123b16c4b88.tar.bz2
feature[ats_E6W8N]: Disable display options
Conflicts: plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeDisplayOptionsComponentImpl.java8
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java30
2 files changed, 37 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeDisplayOptionsComponentImpl.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeDisplayOptionsComponentImpl.java
index df3d28f..8dca72a 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeDisplayOptionsComponentImpl.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeDisplayOptionsComponentImpl.java
@@ -79,4 +79,12 @@ public class OseeDisplayOptionsComponentImpl extends VerticalLayout implements D
System.out.println("Presenter was null");
}
}
+
+ public void enableDisplayOptions() {
+ showVerboseCheckBox.setEnabled(true);
+ }
+
+ public void disableDisplayOptions() {
+ showVerboseCheckBox.setEnabled(false);
+ }
}
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java
index d0a9b0e..b0aaee1 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultsListComponent.java
@@ -17,6 +17,9 @@ import java.util.Iterator;
import java.util.List;
import org.eclipse.osee.display.api.components.SearchResultComponent;
import org.eclipse.osee.display.api.components.SearchResultsListComponent;
+import org.eclipse.osee.display.api.search.SearchPresenter;
+import org.eclipse.osee.display.api.search.SearchProgressListener;
+import org.eclipse.osee.display.api.search.SearchProgressProvider;
import org.eclipse.osee.display.view.web.CssConstants;
import org.eclipse.osee.display.view.web.components.OseePagingComponent.PageSelectedEvent;
import org.eclipse.osee.display.view.web.components.OseePagingComponent.PageSelectedListener;
@@ -34,7 +37,7 @@ import com.vaadin.ui.VerticalLayout;
* @author Shawn F. Cook
*/
@SuppressWarnings("serial")
-public class OseeSearchResultsListComponent extends VerticalLayout implements SearchResultsListComponent, PageSelectedListener {
+public class OseeSearchResultsListComponent extends VerticalLayout implements SearchResultsListComponent, PageSelectedListener, SearchProgressListener {
private final VerticalLayout mainLayout = new VerticalLayout();
private final VerticalLayout bottomSpacer = new VerticalLayout();
@@ -50,6 +53,10 @@ public class OseeSearchResultsListComponent extends VerticalLayout implements Se
@Override
public void attach() {
if (!isLayoutComplete) {
+ SearchPresenter<?, ?> searchPresenter = ComponentUtility.getPresenter(this);
+ if (searchPresenter != null && searchPresenter instanceof SearchProgressProvider) {
+ ((SearchProgressProvider) searchPresenter).addListener(this);
+ }
createLayout();
isLayoutComplete = true;
}
@@ -70,6 +77,8 @@ public class OseeSearchResultsListComponent extends VerticalLayout implements Se
manySearchResultsHorizLayout.setSizeUndefined();
+ displayOptionsComponent.disableDisplayOptions();
+
mainLayout.setMargin(false, false, false, true);
Panel mainLayoutPanel = new Panel();
mainLayoutPanel.setScrollable(true);
@@ -212,6 +221,25 @@ public class OseeSearchResultsListComponent extends VerticalLayout implements Se
}
@Override
+ public void searchInProgress() {
+ displayOptionsComponent.disableDisplayOptions();
+ }
+
+ @Override
+ public void searchCancelled() {
+ if (resultList.size() > 0) {
+ displayOptionsComponent.enableDisplayOptions();
+ }
+ }
+
+ @Override
+ public void searchCompleted() {
+ if (resultList.size() > 0) {
+ displayOptionsComponent.enableDisplayOptions();
+ }
+ }
+
+ @Override
public void noSearchResultsFound() {
}
}