Esempio n. 1
0
  @Override
  public void itemStateChanged(ItemEvent event) {
    ItemSelectable sel = event.getItemSelectable();
    Object[] obj = sel.getSelectedObjects();
    if ((obj == null) || (obj.length == 0)) {
      return;
    }

    String cellName = obj[0].toString();
    int i = 0;
    for (; (i < _infos.length) && (!_infos[i].getCellName().equals(cellName)); i++) {}
    if (i == _infos.length) {
      System.out.println("No more in list : " + cellName);
      return;
    }
    _cellPanel.showCell(_infos[i], _domainNode.getAddress());
    _commandPanel.showCell(_infos[i], _domainNode.getAddress() + ":" + cellName);
    _cards.show(_cardPanel, _cellMode);
  }
 private static String selectedString(ItemSelectable is) {
   Object selected[] = is.getSelectedObjects();
   return ((selected == null || selected.length == 0) ? "" : (String) selected[0]);
 }