Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DatacageTwinPanel.java @ 9220:e3c2ae1887e8
Allow to filter contents of datacage on client side.
Allow to override column label of datacage
Some code cleanup
author | gernotbelger |
---|---|
date | Wed, 04 Jul 2018 12:00:51 +0200 |
parents | af73fdd96920 |
children | 84397da33d17 |
comparison
equal
deleted
inserted
replaced
9219:8642a76f22be | 9220:e3c2ae1887e8 |
---|---|
30 private final int maxCount; | 30 private final int maxCount; |
31 private final String msgMaxCount; | 31 private final String msgMaxCount; |
32 | 32 |
33 public static interface IDatacageTwinPanelInfo extends IRecommendationInfo { | 33 public static interface IDatacageTwinPanelInfo extends IRecommendationInfo { |
34 String getOuts(); | 34 String getOuts(); |
35 | |
36 String getColumnLabel(); | |
35 } | 37 } |
36 | 38 |
37 public DatacageTwinPanel(final User user, final IValidator validator, final IDatacageTwinPanelInfo leftInfo, final IDatacageTwinPanelInfo rightInfo, | 39 public DatacageTwinPanel(final User user, final IValidator validator, final IDatacageTwinPanelInfo leftInfo, final IDatacageTwinPanelInfo rightInfo, |
38 final int maxCount, final String msgMaxCount) { | 40 final int maxCount, final String msgMaxCount) { |
39 super(user, validator, leftInfo, rightInfo); | 41 super(user, validator, leftInfo, rightInfo); |
52 | 54 |
53 final VLayout layout = new VLayout(); | 55 final VLayout layout = new VLayout(); |
54 final HLayout helperLayout = new HLayout(); | 56 final HLayout helperLayout = new HLayout(); |
55 | 57 |
56 final String leftOuts = this.leftInfo.getOuts(); | 58 final String leftOuts = this.leftInfo.getOuts(); |
59 final String leftLabel = this.leftInfo.getColumnLabel(); | |
60 final DatacageWidgetData leftData = new DatacageWidgetData(this.artifact, user, leftOuts, "load-system:true", false, leftLabel); | |
61 | |
57 final String rightOuts = this.rightInfo.getOuts(); | 62 final String rightOuts = this.rightInfo.getOuts(); |
63 final String rightLabel = this.rightInfo.getColumnLabel(); | |
64 final DatacageWidgetData rightData = new DatacageWidgetData(this.artifact, user, rightOuts, "load-system:true", false, rightLabel); | |
58 | 65 |
59 helperLayout.addMember(new DatacagePairWidget(this.artifact, user, leftOuts, rightOuts, differencesList, this.maxCount, this.msgMaxCount)); | 66 helperLayout.addMember(new DatacagePairWidget(leftData, rightData, differencesList, this.maxCount, this.msgMaxCount)); |
60 | 67 |
61 if (dataList != null && dataList.get(0) != null && dataList.get(0).getDescription() != null) { | 68 if (dataList != null && dataList.get(0) != null && dataList.get(0).getDescription() != null) { |
62 final Label title = new Label(dataList.get(0).getDescription()); | 69 final Label title = new Label(dataList.get(0).getDescription()); |
63 title.setHeight("25px"); | 70 title.setHeight("25px"); |
64 layout.addMember(title); | 71 layout.addMember(title); |
69 layout.setMembersMargin(10); | 76 layout.setMembersMargin(10); |
70 this.helperContainer.addMember(helperLayout); | 77 this.helperContainer.addMember(helperLayout); |
71 | 78 |
72 return layout; | 79 return layout; |
73 } | 80 } |
74 | |
75 } | 81 } |