jTracer  1.03
Stack trace visualization tool
ImageIcon org.libcsdbg.jtracer.Registry.loadIcon ( String  nm)

Load an icon from the current theme.

Parameters
[in]nmthe icon file name
Returns
the icon (null if it fails to locate/load the icon file)

Definition at line 220 of file Registry.java.

References org.libcsdbg.jtracer.Registry.debug(), org.libcsdbg.jtracer.Registry.getResource(), and org.libcsdbg.jtracer.Registry.isLinux().

Referenced by org.libcsdbg.jtracer.MenuBar.actionPerformed(), org.libcsdbg.jtracer.Session.addTrace(), and org.libcsdbg.jtracer.Registry.getProjectIcons().

221  {
222  try {
223  File f = null;
224  if (isLinux())
225  f = getResource("theme/current/icons/" + nm);
226  else
227  f = getResource("theme/default/icons/" + nm);
228 
229  return new ImageIcon(f.getCanonicalPath());
230  }
231 
232  catch (Throwable t) {
233  debug(t);
234  }
235 
236  return null;
237  }
static synchronized void debug(Throwable err)
Output debug text for an exception.
Definition: Registry.java:398
static boolean isLinux()
Definition: Registry.java:433
File getResource(String path)
Get a resource file.
Definition: Registry.java:202

+ Here is the call graph for this function:

+ Here is the caller graph for this function: