@Override public void frameArrived(MessageObjectFrame frame) { Object obj = frame.getObject(); if (obj instanceof CellInfo[]) { _infos = (CellInfo[]) obj; _list.removeAll(); int systemIndex = -1; TreeSet<String> sorted = new TreeSet<>(); for (CellInfo cellInfo : _infos) { sorted.add(cellInfo.getCellName()); } Iterator<String> it = sorted.iterator(); for (int i = 0; it.hasNext(); i++) { String name = it.next(); _list.add(name); if (name.equals("System")) { systemIndex = i; } } if (systemIndex > -1) { _cellPanel.showCell(_infos[systemIndex], _domainNode.getAddress()); _commandPanel.showCell(_infos[systemIndex], _domainNode.getAddress() + ":System"); _list.select("System"); } } }
public void clear() { _list.removeAll(); _cellPanel.clear(); _commandPanel.clear(); }