Mercurial > dive4elements > river
changeset 789:e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
flys-client/trunk@2291 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 06 Jul 2011 13:06:04 +0000 |
parents | dfbc6693247e |
children | 3fa8583434b2 |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java flys-client/src/main/webapp/FLYS.css |
diffstat | 3 files changed, 31 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Wed Jul 06 12:31:32 2011 +0000 +++ b/flys-client/ChangeLog Wed Jul 06 13:06:04 2011 +0000 @@ -1,3 +1,9 @@ +2011-07-06 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/client/client/ui/ParameterList.java, + src/main/webapp/FLYS.css: Some layout improvements related to the height + of components. + 2011-07-06 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/client/client/ui/ParameterList.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java Wed Jul 06 12:31:32 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java Wed Jul 06 13:06:04 2011 +0000 @@ -63,6 +63,8 @@ HasParameterChangeHandler, CollectionChangeHandler, OutputModesChangeHandler, AdvanceHandler { + public static final String STYLENAME_OLD_PARAMETERS = "oldParameters"; + /** The message class that provides i18n strings.*/ protected FLYSConstants MSG = GWT.create(FLYSConstants.class); @@ -165,6 +167,7 @@ } oldItems.setMembersMargin(10); + oldItems.setStyleName(STYLENAME_OLD_PARAMETERS); currentItems.setAlign(VerticalAlignment.TOP); left.setMembersMargin(20); @@ -466,6 +469,20 @@ else { currentItems.setHeight(1); } + + Canvas[] members = currentItems.getMembers(); + if (members == null || members.length == 0) { + currentItems.setHeight(1); + } + else { + int height = 0; + + for (Canvas member: members) { + height += member.getHeight(); + } + + currentItems.setHeight(height); + } } @@ -682,6 +699,9 @@ if (exports.size() > 0) { exportModes.addMember(new ExportPanel(c, exports)); } + else { + exportModes.setHeight(1); + } } protected void updateReportModes(Collection c, List<ReportMode> reports) {