Changeset 2005 in josm for trunk/src/org/openstreetmap/josm/gui/MapFrame.java
- Timestamp:
- 29.08.2009 15:51:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r1890 r2005 70 70 * instead of adding directly to this list. 71 71 */ 72 p ublicJPanel toggleDialogs = new JPanel();73 p ublicArrayList<ToggleDialog> allDialogs = new ArrayList<ToggleDialog>();72 private JPanel toggleDialogs = new JPanel(); 73 private ArrayList<ToggleDialog> allDialogs = new ArrayList<ToggleDialog>(); 74 74 75 75 public final ButtonGroup toolGroup = new ButtonGroup(); … … 135 135 public void destroy() { 136 136 for (ToggleDialog t : allDialogs) { 137 t.close ();137 t.closeDetachedDialog(); 138 138 } 139 139 for (int i = 0; i < toolBarActions.getComponentCount(); ++i) … … 167 167 for (Component c : toggleDialogs.getComponents()) { 168 168 if (c instanceof ToggleDialog) { 169 boolean sel = Main.pref.getBoolean(((ToggleDialog)c).prefName+".visible"); 170 ((ToggleDialog)c).action.button.setSelected(sel); 171 c.setVisible(sel); 169 ToggleDialog td = (ToggleDialog)c; 170 if (Main.pref.getBoolean(td.getPreferencePrefix()+".visible")) { 171 td.showDialog(); 172 } 172 173 } 173 174 } … … 179 180 */ 180 181 public IconToggleButton addToggleDialog(ToggleDialog dlg) { 181 IconToggleButton button = new IconToggleButton(dlg.action); 182 dlg.action.button = button; 183 dlg.parent = toggleDialogs; 182 IconToggleButton button = new IconToggleButton(dlg.getToggleAction()); 183 dlg.setParent(toggleDialogs); 184 184 toolBarToggle.add(button); 185 185 toggleDialogs.add(dlg);
Note: See TracChangeset
for help on using the changeset viewer.
