private void showServices() {
// Remove all of the items from the listField.
_treeField.deleteAll();
// Get a copy of the ServiceRouting class.
final ServiceRouting serviceRouting = ServiceRouting.getInstance();
// Add in our new items by trolling through the ServiceBook API.
final ServiceBook sb = ServiceBook.getSB();
final ServiceRecord[] records = sb.getRecords();
if (records == null) {
return;
}
final int rootNode = _treeField.addChildNode(0, "Service Records");
final int numRecords = records.length;
for (int i = 0; i < numRecords; i++) {
final String name = records[i].getName();
String description = records[i].getDescription();
if (description == null || description.length() == 0) {
description = "No description available";
}
final String uid = records[i].getUid();
final boolean serialBypass =
serviceRouting.isSerialBypassActive(uid);
final int newParentNode = _treeField.addChildNode(rootNode, name);
_treeField.addChildNode(newParentNode, description);
_treeField.addChildNode(newParentNode, uid);
_treeField.addChildNode(newParentNode,