Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java @ 7934:71a2e408adca
Moved info stack section to top level widget (parameterlist).
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 17 Jun 2014 09:47:45 +0200 |
parents | 2a97d9c3413a |
children | b1ff606f01ee |
comparison
equal
deleted
inserted
replaced
7933:900299ab8e6e | 7934:71a2e408adca |
---|---|
9 package org.dive4elements.river.client.client.ui; | 9 package org.dive4elements.river.client.client.ui; |
10 | 10 |
11 import com.google.gwt.core.client.GWT; | 11 import com.google.gwt.core.client.GWT; |
12 import com.google.gwt.user.client.rpc.AsyncCallback; | 12 import com.google.gwt.user.client.rpc.AsyncCallback; |
13 | 13 |
14 import com.smartgwt.client.types.Overflow; | |
14 import com.smartgwt.client.types.VerticalAlignment; | 15 import com.smartgwt.client.types.VerticalAlignment; |
15 import com.smartgwt.client.types.VisibilityMode; | 16 import com.smartgwt.client.types.VisibilityMode; |
16 import com.smartgwt.client.util.SC; | 17 import com.smartgwt.client.util.SC; |
17 import com.smartgwt.client.widgets.Canvas; | 18 import com.smartgwt.client.widgets.Canvas; |
18 import com.smartgwt.client.widgets.layout.HLayout; | 19 import com.smartgwt.client.widgets.layout.HLayout; |
223 protected SectionStack createSectionStack() { | 224 protected SectionStack createSectionStack() { |
224 stack = new SectionStack(); | 225 stack = new SectionStack(); |
225 stack.setHeight100(); | 226 stack.setHeight100(); |
226 stack.setCanResizeSections(true); | 227 stack.setCanResizeSections(true); |
227 stack.setVisibilityMode(VisibilityMode.MULTIPLE); | 228 stack.setVisibilityMode(VisibilityMode.MULTIPLE); |
229 stack.setOverflow(Overflow.SCROLL); | |
228 | 230 |
229 // This canvas is used to render helper widgets. | 231 // This canvas is used to render helper widgets. |
230 final SectionStackSection helperSection = new SectionStackSection(); | 232 final SectionStackSection helperSection = new SectionStackSection(); |
231 helperSection.setExpanded(false); | 233 helperSection.setExpanded(false); |
232 helperSection.setTitle(MSG.helperPanelTitle()); | 234 helperSection.setTitle(MSG.helperPanelTitle()); |
254 tablePanel = new VLayout() { | 256 tablePanel = new VLayout() { |
255 @Override | 257 @Override |
256 public void addMember(Canvas component) { | 258 public void addMember(Canvas component) { |
257 super.addMember(component); | 259 super.addMember(component); |
258 tableSection.setExpanded(true); | 260 tableSection.setExpanded(true); |
261 stack.getSection(InfoPanel.SECTION_ID).setExpanded(false); | |
259 } | 262 } |
260 | 263 |
261 @Override | 264 @Override |
262 public void removeMembers(Canvas[] components) { | 265 public void removeMembers(Canvas[] components) { |
263 super.removeMembers(components); | 266 super.removeMembers(components); |
977 | 980 |
978 private void showInfoPanel() { | 981 private void showInfoPanel() { |
979 GWT.log("ParameterList - showInfoPanel"); | 982 GWT.log("ParameterList - showInfoPanel"); |
980 | 983 |
981 /* Don't add InfoPanel twice */ | 984 /* Don't add InfoPanel twice */ |
982 SectionStackSection exists = stack.getSection(InfoPanel.SECTION_ID); | 985 SectionStackSection info = stack.getSection(InfoPanel.SECTION_ID); |
983 if (exists == null) { | 986 if (info == null) { |
984 stack.addSection(infoPanel.getSection(), 0); | 987 info = new SectionStackSection(); |
985 } | 988 info.setTitle(infoPanel.getSectionTitle()); |
986 | 989 info.setID(InfoPanel.SECTION_ID); |
987 infoPanel.show(); | 990 info.setName(InfoPanel.SECTION_ID); |
991 info.setItems(infoPanel); | |
992 stack.addSection(info, 0); | |
993 } | |
994 | |
995 info.setExpanded(true); | |
988 } | 996 } |
989 | 997 |
990 private void hideInfoPanel() { | 998 private void hideInfoPanel() { |
991 GWT.log("ParameterList - hideInfoPanel"); | 999 GWT.log("ParameterList - hideInfoPanel"); |
992 | 1000 |
1015 else { | 1023 else { |
1016 GWT.log("ParameterList - renderInfo no river"); | 1024 GWT.log("ParameterList - renderInfo no river"); |
1017 hideInfoPanel(); | 1025 hideInfoPanel(); |
1018 } | 1026 } |
1019 } | 1027 } |
1020 | |
1021 /** | |
1022 * Allow to close all folds of the info panel. | |
1023 * This is necessary e.g. if a csv result should be shown. | |
1024 */ | |
1025 public void contractInfoPanel() { | |
1026 if (infoPanel != null) { | |
1027 infoPanel.contract(); | |
1028 } | |
1029 } | |
1030 | |
1031 } | 1028 } |
1032 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 1029 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |