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

Handler for toggle menu item action events.

Parameters
[in]eventthe action event

Definition at line 345 of file MenuBar.java.

References org.libcsdbg.jtracer.Registry.loadIcon(), and org.libcsdbg.jtracer.MenuBar.toggleStates.

346  {
347  try {
348  String cmd = event.getActionCommand();
349 
350  int index = 0;
351  if (cmd.equals("Statusbar"))
352  index++;
353 
354  else if (cmd.equals("Always on top"))
355  index += 2;
356 
357  /* Change the state and icon of the toggle item */
358  boolean state = !toggleStates[index];
359  toggleStates[index] = state;
360  String nm = ((state) ? "on" : "off") + "16.png";
361 
362  Registry conf = Registry.getCurrent();
363  getMenu(1).getItem(index).setIcon(conf.loadIcon(nm));
364  }
365 
366  catch (Throwable t) {
367  Registry.debug(t);
368  }
369  }
boolean toggleStates[]
State of the toggle menu items.
Definition: MenuBar.java:43

+ Here is the call graph for this function: