jTracer  1.03
Stack trace visualization tool
void org.libcsdbg.jtracer.SessionManager.shiftSelection ( int  step)

Select the previous/next not iconified client window.

Parameters
[in]stepthe shift direction (-1 for previous, 1 for next)
Note
The shift step is canonicalized

Definition at line 132 of file SessionManager.java.

References org.libcsdbg.jtracer.SessionManager.current, and org.libcsdbg.jtracer.SessionManager.sessions.

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

133  {
134  step = (step < 0) ? -1 : 1;
135  Session prev = sessions.get(current), cur = null;
136 
137  /*
138  This loop stops when either a non-iconified window is selected or (if all
139  windows are iconified) when a full circle is completed
140  */
141  do {
142  current += step;
143  if (current < 0)
144  current = sessions.size() - 1;
145 
146  else if (current > sessions.size() - 1)
147  current = 0;
148 
149  cur = sessions.get(current);
150  if (cur.isIconified())
151  continue;
152 
153  cur.toFront();
154  break;
155  }
156  while (!prev.equals(cur));
157  }
int current
Currently selected (focused) client.

+ Here is the caller graph for this function: