diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImageSampleSection.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImageSampleSection.java index 20f9630a5fbf35ddd231c3c65ae90cf43a61353b..71c10acc37237470aa2743fbe831b0c34ed689c0 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImageSampleSection.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImageSampleSection.java @@ -38,6 +38,7 @@ import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.S import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.ImagingDatasetGuiUtils.IDatasetImagesReferenceUpdater; import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.dto.LogicalImageReference; import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.DatasetImagesReference; +import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.DatasetReference; import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.ImageSampleContent; import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.LogicalImageInfo; import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellLocation; @@ -95,12 +96,23 @@ public class ImageSampleSection extends TabContent setScrollMode(Scroll.AUTO); addVisualisation(imageSampleContent); + addUnknownDatasetLinks(imageSampleContent.getUnknownDatasets()); layout(); } }; } + private void addUnknownDatasetLinks(List<DatasetReference> unknownDatasets) + { + ImagingDatasetGuiUtils guiUtils = new ImagingDatasetGuiUtils(viewContext); + Widget w = guiUtils.tryCreateUnknownDatasetsLinks(unknownDatasets); + if (w != null) + { + add(w, LayoutUtils.createRowLayoutSurroundingData()); + } + } + private void addVisualisation(ImageSampleContent imageSampleContent) { RowData margins = LayoutUtils.createRowLayoutSurroundingData(); diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImagingDatasetGuiUtils.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImagingDatasetGuiUtils.java index 28954f720065d8758f209f4cf5d426afccfa84ac..84dade28c134bfc4d1620f89fe9cc8eb593b21e6 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImagingDatasetGuiUtils.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImagingDatasetGuiUtils.java @@ -24,6 +24,7 @@ import com.extjs.gxt.ui.client.event.SelectionChangedListener; import com.extjs.gxt.ui.client.widget.LayoutContainer; import com.extjs.gxt.ui.client.widget.Text; import com.extjs.gxt.ui.client.widget.form.SimpleComboValue; +import com.extjs.gxt.ui.client.widget.layout.RowLayout; import com.extjs.gxt.ui.client.widget.layout.TableLayout; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; @@ -52,7 +53,7 @@ import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.FeatureVectorD */ class ImagingDatasetGuiUtils { - private static final String UNKNOWN_DATASETS_LABEL = "Other data connected to this plate:"; + private static final String UNKNOWN_DATASETS_LABEL = "Other connected datasets:"; // -------- @@ -88,6 +89,7 @@ class ImagingDatasetGuiUtils return null; } LayoutContainer c = new LayoutContainer(); + c.setLayout(new RowLayout()); c.add(new Text(UNKNOWN_DATASETS_LABEL)); for (DatasetReference dataset : unknownDatasets) { diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/PlateContentLoader.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/PlateContentLoader.java index 859b2ca0b77cce334b259e2535be7fb3fa968a30..03c029f1b3fa791ac5a4fcf074ca5d3e565485ff 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/PlateContentLoader.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/PlateContentLoader.java @@ -178,7 +178,7 @@ public class PlateContentLoader List<DatasetImagesReference> imageDatasetReferences = fetchImageDatasets(datasets); List<FeatureVectorDataset> featureVectorDatasets = filterAndFetchFeatureVectors(datasets); - List<DatasetReference> unknownDatasetReferences = fetchUnknownDatasets(datasets); + List<DatasetReference> unknownDatasetReferences = extractUnknownDatasets(datasets); Geometry plateGeometry = PlateDimensionParser.getPlateGeometry(plate.getProperties()); int rows = plateGeometry.getNumberOfRows(); @@ -188,7 +188,7 @@ public class PlateContentLoader unknownDatasetReferences); } - private List<DatasetReference> fetchUnknownDatasets(List<ExternalDataPE> datasets) + private List<DatasetReference> extractUnknownDatasets(List<ExternalDataPE> datasets) { List<ExternalDataPE> unknownDatasets = ScreeningUtils.filterUnknownDatasets(datasets); List<DatasetReference> unknownDatasetReferences = createDatasetReferences(unknownDatasets); @@ -396,6 +396,8 @@ public class PlateContentLoader .getCode(), wellLocationOrNull); logicalImages.add(logicalImage); } - return new ImageSampleContent(logicalImages); + + List<DatasetReference> unknownDatasetReferences = extractUnknownDatasets(datasets); + return new ImageSampleContent(logicalImages, unknownDatasetReferences); } } diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/ScreeningUtils.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/ScreeningUtils.java index 65ef01853c9df39148cb512fd0254b9b188fa78d..98accc89cf3d19b331fab0360ff6c105f1f7081f 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/ScreeningUtils.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/ScreeningUtils.java @@ -85,7 +85,8 @@ public class ScreeningUtils for (ExternalDataPE dataset : datasets) { if (isTypeEqual(dataset, ScreeningConstants.HCS_IMAGE_ANALYSIS_DATASET_TYPE) == false - && isTypeEqual(dataset, ScreeningConstants.HCS_IMAGE_DATASET_TYPE) == false) + && isTypeEqual(dataset, ScreeningConstants.HCS_IMAGE_DATASET_TYPE) == false + && isTypeEqual(dataset, ScreeningConstants.MICROSCOPY_IMAGE_DATASET_TYPE) == false) { chosenDatasets.add(dataset); } diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/basic/dto/ImageSampleContent.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/basic/dto/ImageSampleContent.java index e3f98ec3dafacb9b411b75f50baf97d8f209dc37..b672f2b0b2e30c63e34190e2a7cf5c7fa6155901 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/basic/dto/ImageSampleContent.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/basic/dto/ImageSampleContent.java @@ -33,19 +33,28 @@ public class ImageSampleContent implements ISerializable private List<LogicalImageInfo> logicalImages; + private List<DatasetReference> unknownDatasets; + // GWT only @SuppressWarnings("unused") private ImageSampleContent() { } - public ImageSampleContent(List<LogicalImageInfo> logicalImages) + public ImageSampleContent(List<LogicalImageInfo> logicalImages, + List<DatasetReference> unknownDatasets) { this.logicalImages = logicalImages; + this.unknownDatasets = unknownDatasets; } public List<LogicalImageInfo> getLogicalImages() { return logicalImages; } + + public List<DatasetReference> getUnknownDatasets() + { + return unknownDatasets; + } }