Skip to content
Snippets Groups Projects
Commit bd5424b7 authored by felmer's avatar felmer
Browse files

improve layout of properties grid section

SVN: 26610
parent f1464202
No related branches found
No related tags found
No related merge requests found
...@@ -62,12 +62,18 @@ public final class PropertyGrid extends Grid ...@@ -62,12 +62,18 @@ public final class PropertyGrid extends Grid
private final IMessageProvider messageProvider; private final IMessageProvider messageProvider;
public PropertyGrid(final IViewContext<?> viewContext, final int rows) public PropertyGrid(final IViewContext<?> viewContext, final int rows)
{
this(viewContext, rows, "30%");
}
public PropertyGrid(final IViewContext<?> viewContext, final int rows, String widthOfFirstColumn)
{ {
super(rows, 2); super(rows, 2);
this.messageProvider = viewContext; this.messageProvider = viewContext;
this.viewContext = viewContext; this.viewContext = viewContext;
setStyleName("property-grid"); setStyleName("property-grid");
getColumnFormatter().addStyleName(0, "header"); getColumnFormatter().addStyleName(0, "header");
getColumnFormatter().setWidth(0, widthOfFirstColumn);
defaultPropertyValueRenderer = new ObjectPropertyValueRenderer(messageProvider); defaultPropertyValueRenderer = new ObjectPropertyValueRenderer(messageProvider);
registerDefaultPropertyValueRenderers(); registerDefaultPropertyValueRenderers();
} }
......
...@@ -296,7 +296,7 @@ public class ProteinViewer extends AbstractViewerWithVerticalSplit<IEntityInform ...@@ -296,7 +296,7 @@ public class ProteinViewer extends AbstractViewerWithVerticalSplit<IEntityInform
private PropertyGrid createPropertyGrid(ProteinByExperiment protein) private PropertyGrid createPropertyGrid(ProteinByExperiment protein)
{ {
final Map<String, Object> properties = new LinkedHashMap<String, Object>(); final Map<String, Object> properties = new LinkedHashMap<String, Object>();
PropertyGrid propertyGrid = new PropertyGrid(viewContext, 0); PropertyGrid propertyGrid = new PropertyGrid(viewContext, 0, "200");
if (experimentOrNull != null) if (experimentOrNull != null)
{ {
properties.put(viewContext.getMessage(Dict.EXPERIMENT_LABEL), experimentOrNull); properties.put(viewContext.getMessage(Dict.EXPERIMENT_LABEL), experimentOrNull);
......
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