Java Reference
In-Depth Information
L ISTING 8.9 Continued
/**
* Sets a message visible at the top showing the
* currently downloading resource file
* @param rsr Text to show
*/
public static void setLoadingResource(String rsr) {
if (splash != null) {
splash.resourceLabel.setText(“Downloading: “+rsr);
}
}
/**
* Shows up the splash window or destroys it
* @param show
*/
public static void showUp(boolean show) {
if (splash == null)
100: return;
splash.setVisible(show);
if (show == false) {
splash.setCursor(Cursor.getDefaultCursor());
splash = null;
} else {
splash.setCursor(new Cursor(Cursor.WAIT_CURSOR));
try {
// Lookup the Service
extensionInstaller =
(ExtensionInstallerService)ServiceManager.lookup(“javax.jnlp.ExtensionInstaller
Service”);
// Hide JNLP Client's download window
extensionInstaller.hideStatusWindow();
} catch(UnavailableServiceException use) {
System.out.println(“Service not supported: “+use);
}
}
}
/**
120: * Takes charge of all the JAR delivery
*/
public void run() {
//downloads all the needed resources
DownloadService ds;
Search WWH ::




Custom Search