Changeset 12221 in josm
- Timestamp:
- 2017-05-21T00:48:38+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
r12128 r12221 150 150 assertNull(Main.getLayerManager().getActiveLayer()); 151 151 152 if (Main.contentPanePrivate == null) { 153 Main.contentPanePrivate = new JPanel(new BorderLayout()); 154 } 155 if (Main.mainPanel == null) { 156 Main.mainPanel = new MainPanel(Main.getLayerManager()); 157 } 158 if (Main.toolbar == null) { 159 Main.toolbar = new ToolbarPreferences(); 160 } 152 initContentPane(); 153 initMainPanel(); 154 initToolbar(); 161 155 if (Main.main == null) { 162 156 new MainApplication().initialize(); … … 167 161 Main.getLayerManager().addLayer(new TestLayer()); 168 162 } 163 164 /** 165 * Make sure {@code Main.contentPanePrivate} is initialized. 166 */ 167 public static void initContentPane() { 168 if (Main.contentPanePrivate == null) { 169 Main.contentPanePrivate = new JPanel(new BorderLayout()); 170 } 171 } 172 173 /** 174 * Make sure {@code Main.mainPanel} is initialized. 175 */ 176 public static void initMainPanel() { 177 if (Main.mainPanel == null) { 178 Main.mainPanel = new MainPanel(Main.getLayerManager()); 179 } 180 } 181 182 /** 183 * Make sure {@code Main.toolbar} is initialized. 184 */ 185 public static void initToolbar() { 186 if (Main.toolbar == null) { 187 Main.toolbar = new ToolbarPreferences(); 188 } 189 } 169 190 }
Note:
See TracChangeset
for help on using the changeset viewer.