예제 #1
0
 void updateDeviceList(TreeNode parentNode, DeviceList devList) {
   int nDevs = devList.size();
   for (int n = 0; n < nDevs; n++) {
     Device dev = devList.getDevice(n);
     String friendlyName = dev.getFriendlyName();
     TreeNode devNode = new TreeNode(friendlyName);
     devNode.setUserData(dev);
     parentNode.add(devNode);
     updateServiceList(devNode, dev);
     updateIconList(devNode, dev);
     updateDeviceList(devNode, dev.getDeviceList());
   }
 }
예제 #2
0
 void updateIconList(TreeNode parentNode, Device device) {
   IconList iconList = device.getIconList();
   int nIcons = iconList.size();
   for (int n = 0; n < nIcons; n++) {
     Icon icon = iconList.getIcon(n);
     String url = icon.getURL();
     TreeNode iconNode = new TreeNode(url);
     iconNode.setUserData(icon);
     parentNode.add(iconNode);
   }
 }
예제 #3
0
 void updateServiceList(TreeNode parentNode, Device device) {
   ServiceList serviceList = device.getServiceList();
   int nServices = serviceList.size();
   for (int n = 0; n < nServices; n++) {
     Service service = serviceList.getService(n);
     String serviceType = service.getServiceType();
     TreeNode serviceNode = new TreeNode(serviceType);
     serviceNode.setUserData(service);
     parentNode.add(serviceNode);
     updateActionList(serviceNode, service);
     updateStateVariableList(serviceNode, service);
   }
 }