jTracer  1.03
Stack trace visualization tool
void org.libcsdbg.jtracer.MenuBar.renderItem ( Component  c,
int  menu,
int  i,
String  key,
Object  val 
)
private

Update the UI state of a single menu item.

Parameters
[in]cthe item
[in]menuthe menu index
[in]ithe item index in the menu
[in]keythe related UI property name
[in]valthe UI property value

Definition at line 307 of file MenuBar.java.

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

308  {
309  Boolean how = (Boolean) val;
310 
311  if (key.equals("isServing")) {
312  if (menu != 0)
313  return;
314 
315  switch (i) {
316  case 0:
317  c.setEnabled(!how);
318  break;
319 
320  case 1:
321  case 2:
322  c.setEnabled(how);
323  }
324  }
325 
326  else if (key.equals("hasClients"))
327  switch (menu) {
328  case 1:
329  if (i == 4)
330  c.setEnabled(how);
331  break;
332 
333  case 2:
334  if (i < 8)
335  c.setEnabled(how);
336  }
337  }

+ Here is the caller graph for this function: