MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / refresh

Method refresh

src/org/opensourcephysics/tools/LaunchSaver.java:170–188  ·  view source on GitHub ↗

Refreshes the GUI.

()

Source from the content-addressed store, hash-verified

168 * Refreshes the GUI.
169 */
170 private void refresh() {
171 inspectButton.setEnabled(getSelectedNode() != null);
172 String path = null;
173 if (!Launcher.tabSetBasePath.equals("")) { //$NON-NLS-1$
174 path = Launcher.tabSetBasePath;
175 } else if (builder.jarBasePath != null) {
176 path = builder.jarBasePath;
177 } else {
178 path = XML.forwardSlash(XML.getUserDirectory());
179 }
180 if (path.indexOf("javaws") > -1) { //$NON-NLS-1$
181 path = XML.forwardSlash(OSPRuntime.getUserHome());
182 Launcher.tabSetBasePath = path;
183 }
184 pathField.setText(path + "/"); //$NON-NLS-1$
185 pathField.setBackground(Color.white);
186 treeModel.nodeChanged(root);
187 tree.repaint();
188 }
189
190 /**
191 * Displays the properties of the selected node in an xml inspector.

Callers 5

setBuilderMethod · 0.95
setTabSetBasePathMethod · 0.95
setTabSetNameMethod · 0.95
chooseTabSetMethod · 0.95
getCellEditorValueMethod · 0.45

Calls 9

getSelectedNodeMethod · 0.95
forwardSlashMethod · 0.95
getUserDirectoryMethod · 0.95
getUserHomeMethod · 0.95
setEnabledMethod · 0.65
equalsMethod · 0.65
setTextMethod · 0.65
repaintMethod · 0.65
setBackgroundMethod · 0.45

Tested by

no test coverage detected