comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java @ 3827:ed978af1f089

Improve the handling of the GaugePanel in the ParameterList flys-client/trunk@5522 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Wed, 19 Sep 2012 12:43:43 +0000
parents 4e33aa341e51
children 60911c8422b7
comparison
equal deleted inserted replaced
3826:7a34af684ed4 3827:ed978af1f089
222 super.removeMembers(components); 222 super.removeMembers(components);
223 gaugeSection.setExpanded(false); 223 gaugeSection.setExpanded(false);
224 } 224 }
225 }; 225 };
226 gaugePanel.setWidth100(); 226 gaugePanel.setWidth100();
227 gaugePanel.setHeight("20%"); 227 gaugePanel.setHeight100();
228 228
229 // This canvas is used to render helper widgets. 229 // This canvas is used to render helper widgets.
230 final SectionStackSection helperSection = new SectionStackSection(); 230 final SectionStackSection helperSection = new SectionStackSection();
231 helperSection.setExpanded(false); 231 helperSection.setExpanded(false);
232 helperSection.setTitle(MSG.helperPanelTitle()); 232 helperSection.setTitle(MSG.helperPanelTitle());
699 Canvas[] c = helperPanel.getMembers(); 699 Canvas[] c = helperPanel.getMembers();
700 if (c != null && c.length > 0) { 700 if (c != null && c.length > 0) {
701 helperPanel.removeMembers(c); 701 helperPanel.removeMembers(c);
702 } 702 }
703 703
704 c = gaugePanel.getMembers();
705 if (c != null && c.length > 0) {
706 gaugePanel.removeMembers(c);
707 }
708
709 Artifact art = event.getNewValue(); 704 Artifact art = event.getNewValue();
710 ArtifactDescription desc = art.getArtifactDescription(); 705 ArtifactDescription desc = art.getArtifactDescription();
711 706
712 DataList currentData = desc.getCurrentData(); 707 DataList currentData = desc.getCurrentData();
713 if (currentData != null) { 708 if (currentData != null) {
747 setCurrentData(null, null); 742 setCurrentData(null, null);
748 } 743 }
749 } 744 }
750 if (art instanceof WINFOArtifact) { 745 if (art instanceof WINFOArtifact) {
751 renderGaugeInfo(desc.getRiver()); 746 renderGaugeInfo(desc.getRiver());
752 gaugePanel.show();
753 } 747 }
754 748
755 addOldDatas( 749 addOldDatas(
756 desc.getOldData(), 750 desc.getOldData(),
757 event.getType() == ParameterChangeEvent.Type.BACK); 751 event.getType() == ParameterChangeEvent.Type.BACK);

http://dive4elements.wald.intevation.org