jTracer  1.03
Stack trace visualization tool
void org.libcsdbg.jtracer.SessionManager.windowClosing ( WindowEvent  event)

Handler for events fired for closing windows.

Parameters
[in]eventthe closing window event

Definition at line 239 of file SessionManager.java.

References org.libcsdbg.jtracer.SessionManager.current, org.libcsdbg.jtracer.Session.isIconified(), org.libcsdbg.jtracer.SessionManager.owner, and org.libcsdbg.jtracer.SessionManager.sessions.

240  {
241  try {
242  JFrame f = (JFrame) event.getWindow();
243  if (f.equals(owner))
244  System.exit(0);
245 
246  int i, cnt;
247  for (i = 0, cnt = sessions.size(); i < cnt; i++)
248  if (f.equals(sessions.get(i)))
249  break;
250 
251  if (i == cnt)
252  return;
253 
254  Session cur = sessions.remove(i);
255  cur.removeWindowListener(this);
256  cur.quit();
257  cur.dispose();
258 
259  cnt--;
260  if (cnt == 0) {
261  current = -1;
262  firePropertyChange("sessionCount", null, cnt);
263  return;
264  }
265 
266  if (i < current || current == cnt)
267  current--;
268 
269  firePropertyChange("sessionCount", null, cnt);
270  cur = sessions.get(current);
271  if (cur.isIconified())
272  ;//shiftSelection(1);
273  else
274  cur.toFront();
275  }
276 
277  catch (Throwable t) {
278  Registry.debug(t);
279  }
280  }
int current
Currently selected (focused) client.

+ Here is the call graph for this function: