Changeset 2749 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
- Timestamp:
- 2010-01-07T07:58:44+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
r2711 r2749 40 40 allDialogs = new ArrayList<ToggleDialog>(); 41 41 42 for ( Integer i=0; i < pAllDialogs.size(); ++i) {43 add( pAllDialogs.get(i), false);42 for (ToggleDialog dialog: pAllDialogs) { 43 add(dialog, false); 44 44 } 45 45 … … 106 106 /* INVISIBLE_TO_COLLAPSED, does not happen */ 107 107 ELEMENT_SHRINKS /* else. (Remaining elements have more space.) */ 108 } ;108 } 109 109 /** 110 110 * Reconstruct the view, if the configurations of dialogs has changed. … … 119 119 * reset the panels 120 120 */ 121 for (int i=0; i < N; ++i) { 122 final JPanel p = panels.get(i); 121 for (JPanel p: panels) { 123 122 p.removeAll(); 124 123 p.setVisible(false); … … 180 179 int sumC = 0; // sum of heights of all collapsed dialogs (triggering dialog is never collapsed) 181 180 182 for (int i=0; i<N; ++i) { 183 final ToggleDialog dlg = allDialogs.get(i); 181 for (ToggleDialog dlg: allDialogs) { 184 182 if (dlg.isDialogInDefaultView()) { 185 183 if (dlg != triggeredBy) { 186 184 final int ph = dlg.getPreferredHeight(); 187 final int ah = dlg.get Size().height;185 final int ah = dlg.getHeight(); 188 186 sumP += ph; 189 187 sumA += ah; 190 188 } 191 } 192 else if (dlg.isDialogInCollapsedView()) { 193 sumC += dlg.getSize().height; 189 } else if (dlg.isDialogInCollapsedView()) { 190 sumC += dlg.getHeight(); 194 191 } 195 192 } … … 234 231 final ToggleDialog dlg = allDialogs.get(i); 235 232 if (dlg.isDialogInDefaultView() && dlg != triggeredBy) { 236 final int ha = dlg.get Size().height;233 final int ha = dlg.getHeight(); 237 234 final int h0 = ha * R / sumA; 238 235 final int he = dlg.getPreferredHeight() * s2 / (sumP + hp_trig); … … 246 243 } catch (ArithmeticException e) { /* D_p may be zero - nothing wrong with that. */ 247 244 d = 0; 248 } ;245 } 249 246 dlg.setPreferredSize(new Dimension(Integer.MAX_VALUE, h0 - d)); 250 247 }
Note:
See TracChangeset
for help on using the changeset viewer.