Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java @ 4203:de795c13dcfb
Use static method from RiverInfoPanel to calculate the static width
Also add some logging to be able to debug further layout issues while resizing
the GaugePanel.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 22 Oct 2012 15:25:04 +0200 |
parents | 1fa244f70ad5 |
children | 9f9843491ac4 |
comparison
equal
deleted
inserted
replaced
4202:1fa244f70ad5 | 4203:de795c13dcfb |
---|---|
110 @Override | 110 @Override |
111 public void onResized(ResizedEvent event) { | 111 public void onResized(ResizedEvent event) { |
112 /* this height calculation is only an approximation and doesn't reflect | 112 /* this height calculation is only an approximation and doesn't reflect |
113 * the real height of the the gaugetree. */ | 113 * the real height of the the gaugetree. */ |
114 int height = getInnerContentHeight() - | 114 int height = getInnerContentHeight() - |
115 (RiverInfoPanel.HEIGHT + | 115 RiverInfoPanel.getStaticHeight(); |
116 (2 * RiverInfoPanel.BORDER_WIDTH) + | |
117 (2 * RiverInfoPanel.PADDING) + | |
118 (2 * RiverInfoPanel.MARGIN)); | |
119 | 116 |
120 if (height < 0) { | 117 if (height < 0) { |
121 height = 0; | 118 height = 0; |
122 } | 119 } |
123 | 120 |
121 GWT.log("GaugePanel - onResize " + height); | |
122 | |
124 gaugetree.setHeight("" + height + "px"); | 123 gaugetree.setHeight("" + height + "px"); |
124 | |
125 for (Canvas canvas : getMembers()) { | |
126 GWT.log("GaugePanel - member height " + canvas.getHeight()); | |
127 } | |
125 } | 128 } |
126 | 129 |
127 | 130 |
128 /** | 131 /** |
129 * Hide the section stack section. | 132 * Hide the section stack section. |