Changeset 2269 in josm
- Timestamp:
- 2009-10-10T20:35:13+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r2224 r2269 78 78 */ 79 79 private List<ToggleDialog> allDialogs = new ArrayList<ToggleDialog>(); 80 private DialogsPanel dialogsPanel = new DialogsPanel();80 private DialogsPanel dialogsPanel; 81 81 82 82 public final ButtonGroup toolGroup = new ButtonGroup(); … … 108 108 toolGroup.setSelected(((AbstractButton)toolBarActions.getComponent(0)).getModel(), true); 109 109 110 JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, 111 mapView, dialogsPanel); 110 JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true); 111 dialogsPanel = new DialogsPanel(splitPane); 112 splitPane.setLeftComponent(mapView); 113 splitPane.setRightComponent(dialogsPanel); 112 114 113 115 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
r2224 r2269 12 12 import javax.swing.BoxLayout; 13 13 import javax.swing.JPanel; 14 import javax.swing.JSplitPane; 14 15 15 16 import org.openstreetmap.josm.gui.MultiSplitLayout; … … 30 31 */ 31 32 private List<JPanel> panels = new ArrayList<JPanel>(); 33 34 final private JSplitPane parent; 35 public DialogsPanel(JSplitPane parent) { 36 this.parent = parent; 37 } 32 38 33 39 private boolean initialized = false; … … 259 265 mSpltPane.getMultiSplitLayout().setFloatingDividers(true); 260 266 mSpltPane.revalidate(); 267 268 /** 269 * Hide the Panel, if there is nothing to show 270 */ 271 if (numPanels == 1 && panels.get(N-1).getComponents().length == 0) 272 { 273 this.setVisible(false); 274 } else { 275 if (this.getWidth() != 0) { // only if josm started with hidden panel 276 this.setPreferredSize(new Dimension(this.getWidth(), 0)); 277 } 278 this.setVisible(true); 279 parent.resetToPreferredSizes(); 280 } 261 281 } 262 282
Note:
See TracChangeset
for help on using the changeset viewer.