Skip to content
Snippets Groups Projects
Commit 59613497 authored by tpylak's avatar tpylak
Browse files

minor: add an "Experiments" header in experiment browser, so that users know what they browse

SVN: 15489
parent c8f2b325
No related branches found
No related tags found
No related merge requests found
......@@ -229,6 +229,8 @@ public abstract class Dict
// Experiment Browser
//
public static final String EXPEIRMENTS_GRID_HEADER = "experiments_grid_header";
public static final String EXPERIMENT_TYPE = "experiment_type";
public static final String PROJECT_SELECTOR_TITLE = "project_selector_title";
......
......@@ -46,6 +46,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.IB
import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.ICellListener;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.listener.OpenEntityDetailsTabHelper;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedActionWithResult;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IMessageProvider;
import ch.systemsx.cisd.openbis.generic.client.web.client.dto.DefaultResultSetConfig;
import ch.systemsx.cisd.openbis.generic.client.web.client.dto.ListExperimentsCriteria;
import ch.systemsx.cisd.openbis.generic.client.web.client.dto.ResultSet;
......@@ -96,7 +97,15 @@ public class ExperimentBrowserGrid extends
}
};
browserGrid.addGridRefreshListener(toolbar);
return browserGrid.asDisposableWithToolbarAndTree(toolbar, tree);
return createExperimentBrowser(tree, toolbar, browserGrid, viewContext);
}
private static DisposableEntityChooser<Experiment> createExperimentBrowser(
final ProjectSelectionTreeGridContainer tree, final ExperimentBrowserToolbar toolbar,
final ExperimentBrowserGrid browserGrid, IMessageProvider messageProvider)
{
return browserGrid.asDisposableWithToolbarAndTree(toolbar, tree, messageProvider
.getMessage(Dict.EXPEIRMENTS_GRID_HEADER));
}
/**
......@@ -114,7 +123,7 @@ public class ExperimentBrowserGrid extends
final ExperimentBrowserGrid browserGrid = new ExperimentBrowserGrid(viewContext, toolbar);
browserGrid.addGridRefreshListener(toolbar);
browserGrid.extendBottomToolbar();
return browserGrid.asDisposableWithToolbarAndTree(toolbar, tree);
return createExperimentBrowser(tree, toolbar, browserGrid, viewContext);
}
/** Create a grid with the toolbar and a tree with no initial selection. */
......
......@@ -283,7 +283,7 @@ public abstract class AbstractBrowserGrid<T/* Entity */, M extends BaseEntityMod
pagingLoader.addLoadListener(new LoadListener()); // TODO why do we need this?
if (viewContext.isLoggingEnabled())
{
ComponentEventLogger logger = new ComponentEventLogger(viewContext, getId());
ComponentEventLogger logger = new ComponentEventLogger(viewContext, getId());
logger.prepareLoggingBetweenEvents(contentPanel, EventPair.RENDER);
logger.prepareLoggingBetweenEvents(this, EventPair.LAYOUT);
logger.prepareLoggingBetweenEvents(grid, EventPair.LAYOUT);
......@@ -449,7 +449,7 @@ public abstract class AbstractBrowserGrid<T/* Entity */, M extends BaseEntityMod
* the left.
*/
protected final DisposableEntityChooser<T> asDisposableWithToolbarAndTree(
final Component toolbar, final Component tree)
final Component toolbar, final Component tree, String headerOrNull)
{
// WORKAROUND: BorderLayout causes problems when rendered in a tab
// We use RowLayout here but we loose the split this way.
......@@ -460,6 +460,11 @@ public abstract class AbstractBrowserGrid<T/* Entity */, M extends BaseEntityMod
final LayoutContainer subContainer = new LayoutContainer();
subContainer.setLayout(new RowLayout(Orientation.HORIZONTAL));
subContainer.add(tree, new RowData(300, 1));
if (headerOrNull != null)
{
this.contentPanel.setHeaderVisible(true);
this.contentPanel.setHeading(headerOrNull);
}
subContainer.add(this, new RowData(1, 1));
container.add(subContainer, new RowData(1, 1));
......
......@@ -173,7 +173,8 @@ var common = {
//
// Experiment Browser
//
experiments_grid_header: "Experiments",
experiment_type: "Experiment Type",
project_selector_title: "Project Selection",
project_selector_tooltip: "Click on a row with project code to select it.",
......@@ -332,7 +333,7 @@ var common = {
ARCHIVING_MENU_UNARCHIVE: "Unarchive",
ARCHIVING_MENU_LOCK: "Disable Archiving",
ARCHIVING_MENU_UNLOCK: "Enable Archiving",
menu_modules: "Utilities",
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment