jTracer  1.03
Stack trace visualization tool
void org.libcsdbg.jtracer.MenuBar.setSelectedSession ( int  sel)

Update the session list menu to show the currently selected session.

Parameters
[in]selthe currently selected (focused) session index
Note
The index is with respect to the session list, not the menu item list. The two lists are offset by 9

Definition at line 141 of file MenuBar.java.

Referenced by org.libcsdbg.jtracer.MainFrame.propertyChange().

142  {
143  JMenu menu = getMenu(2);
144  Registry conf = Registry.getCurrent();
145  ImageIcon onIcon = conf.loadIcon("on16.png");
146  ImageIcon offIcon = conf.loadIcon("voidrect16.png");
147 
148  for (int i = menu.getMenuComponentCount() - 1; i >= 9; i--) {
149  JMenuItem item = (JMenuItem) menu.getMenuComponent(i);
150  item.setIcon((i - 9 == sel) ? onIcon : offIcon);
151  }
152  }

+ Here is the caller graph for this function: