public SwingIconsDemoTableModel(URL url) {
if (url == null)
{
url = this.getClass().getResource("/jlfgr-1_0.jar");
if (url == null)
{
Log.warn("Unable to find jlfgr-1_0.jar\n"
+ "Unable to load the icons.\n"
+ "Please make sure you have the Java Look and Feel Graphics Repository in "
+ "your classpath.\n"
+ "You may download this jar-file from "
+ "http://developer.java.sun.com/developer/techDocs/hi/repository.");
return;
}
}
try
{
//Log.debug ("Open URL: " + url, new Exception());
final InputStream in = new BufferedInputStream(url.openStream());
readData(in);
in.close();
}
catch (Exception e)
{
Log.warn("Failed to load the Icons", e);
}
Log.debug("Loaded: " + getRowCount() + " icons");
}
Creates a new table model. Parameters:
url - the url for the jlfgr-1_0.jar file (or null to search the classpath).
|