jTracer  1.03
Stack trace visualization tool
void org.libcsdbg.jtracer.Session.actionPerformed ( ActionEvent  event)

Handler for events fired from the toolbar of the frame.

Parameters
[in]eventthe action event

Definition at line 342 of file Session.java.

References org.libcsdbg.jtracer.Alert.error(), org.libcsdbg.jtracer.Session.isLocked, and org.libcsdbg.jtracer.Session.tools.

343  {
344  try {
345  String cmd = event.getActionCommand();
346 
347  if (cmd.equals("Remove trace")) {
348  int i = tabs.getSelectedIndex();
349  if (i < 0)
350  return;
351 
352  traces.remove(i);
353  tabs.remove(i);
354  int cnt = tabs.getTabCount();
355  firePropertyChange("traceCount", null, cnt);
356  if (cnt != 0)
357  return;
358 
359  if (!isLocked) {
360  owner.toFront();
361  dispose();
362  return;
363  }
364 
365  tools.getComponent(0).setEnabled(false);
366  tools.getComponent(7).setEnabled(false);
367  }
368 
369  else if (cmd.equals("Lock")) {
370  isLocked = !isLocked;
371 
372  Registry conf = Registry.getCurrent();
373  Button tool = (Button) tools.getComponent(1);
374 
375  if (isLocked) {
376  tool.setIcon(conf.loadIcon("unlock24.png"));
377  tool.setToolTipText("Unlock");
378  }
379 
380  else {
381  tool.setIcon(conf.loadIcon("lock24.png"));
382  tool.setToolTipText("Lock");
383  }
384  }
385 
386  else if (cmd.equals("Find"))
387  Alert.error(this, "Not implemented yet", false);
388  }
389 
390  catch (Throwable t) {
391  Registry.debug(t);
392  }
393  }
JToolBar tools
Trace and frame tools.
Definition: Session.java:53
boolean isLocked
Lock state indicator.
Definition: Session.java:74

+ Here is the call graph for this function: