Changeset 1890 in josm for trunk/src/org/openstreetmap/josm/gui/MapFrame.java
- Timestamp:
- 2009-08-02T23:15:26+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r1677 r1890 100 100 101 101 toolBarToggle.setFloatable(false); 102 addToggleDialog(new LayerListDialog(this)); 102 LayerListDialog.createInstance(this); 103 addToggleDialog(LayerListDialog.getInstance()); 103 104 addToggleDialog(new PropertiesDialog(this)); 104 105 addToggleDialog(new HistoryDialog()); … … 133 134 */ 134 135 public void destroy() { 135 for (ToggleDialog t : allDialogs) 136 for (ToggleDialog t : allDialogs) { 136 137 t.close(); 138 } 137 139 for (int i = 0; i < toolBarActions.getComponentCount(); ++i) 138 if (toolBarActions.getComponent(i) instanceof Destroyable) 140 if (toolBarActions.getComponent(i) instanceof Destroyable) { 139 141 ((Destroyable)toolBarActions).destroy(); 142 } 140 143 for (int i = 0; i < toolBarToggle.getComponentCount(); ++i) 141 if (toolBarToggle.getComponent(i) instanceof Destroyable) 144 if (toolBarToggle.getComponent(i) instanceof Destroyable) { 142 145 ((Destroyable)toolBarToggle).destroy(); 146 } 143 147 144 148 // remove menu entries … … 195 199 boolean old = isVisible(); 196 200 super.setVisible(aFlag); 197 if (old != aFlag) 201 if (old != aFlag) { 198 202 firePropertyChange("visible", old, aFlag); 203 } 199 204 } 200 205 … … 209 214 if (mapMode == this.mapMode) 210 215 return; 211 if (this.mapMode != null) 216 if (this.mapMode != null) { 212 217 this.mapMode.exitMode(); 218 } 213 219 this.mapMode = mapMode; 214 220 mapMode.enterMode(); … … 230 236 if(Main.pref.getBoolean("sidetoolbar.visible", true)) 231 237 { 232 if(Main.pref.getBoolean("sidetoolbar.scrollable", true)) 238 if(Main.pref.getBoolean("sidetoolbar.scrollable", true)) { 233 239 panel.add(new ScrollViewport(jb, ScrollViewport.VERTICAL_DIRECTION), 234 BorderLayout.WEST);235 else240 BorderLayout.WEST); 241 } else { 236 242 panel.add(jb, BorderLayout.WEST); 237 } 238 if (statusLine != null && Main.pref.getBoolean("statusline.visible", true)) 243 } 244 } 245 if (statusLine != null && Main.pref.getBoolean("statusline.visible", true)) { 239 246 panel.add(statusLine, BorderLayout.SOUTH); 247 } 240 248 } 241 249 }
Note:
See TracChangeset
for help on using the changeset viewer.