示例#1
0
 private void initMonitorParaBlock(Group eq) {
   groupbasicInfo =
       new MonitoringParametersGroup(
           eq,
           formToolkit,
           UIConstant.BASIC_INFO,
           contextService.loadMonitorList(UIConstant.BASIC_INFO_ID));
   groupCityElctronic =
       new MonitoringParametersGroup(
           eq,
           formToolkit,
           UIConstant.CITY_ELECTRONIC,
           contextService.loadMonitorList(UIConstant.CITY_ELECTRONIC_ID));
   groupEntrance =
       new MonitoringParametersGroup(
           eq,
           formToolkit,
           UIConstant.ENTRANCE,
           contextService.loadMonitorList(UIConstant.ENTRANCE_ID));
   groupBattery =
       new MonitoringParametersGroup(
           eq,
           formToolkit,
           UIConstant.BATTERY,
           contextService.loadMonitorList(UIConstant.BATTERY_ID));
   groupSensor =
       new MonitoringParametersGroup(
           eq,
           formToolkit,
           UIConstant.SENSER,
           contextService.loadMonitorList(UIConstant.SENSER_ID));
   // init monitorList
   monitorListInit();
 }
示例#2
0
 private void monitorListInit() {
   monitorMap = new HashMap<Integer, MonitorView>();
   Map<Integer, Integer> typeMap = contextService.loadIndicatorTypeMap();
   for (int i : typeMap.keySet()) {
     switch (typeMap.get(i)) {
       case UIConstant.BASIC_INFO_ID:
         monitorMap.put(i, groupbasicInfo.getMonitorList().get(i));
         break;
       case UIConstant.BATTERY_ID:
         monitorMap.put(i, groupBattery.getMonitorList().get(i));
         break;
       case UIConstant.CITY_ELECTRONIC_ID:
         monitorMap.put(i, groupCityElctronic.getMonitorList().get(i));
         break;
       case UIConstant.ENTRANCE_ID:
         monitorMap.put(i, groupEntrance.getMonitorList().get(i));
         break;
       case UIConstant.SENSER_ID:
         monitorMap.put(i, groupSensor.getMonitorList().get(i));
         break;
     }
   }
 }
示例#3
0
  private void initBaseSitTreeBlock(Composite container) {
    // BaseSiteTreeGroup
    groupBaseSite = new Group(container, SWT.BORDER);
    groupBaseSite.setText("基站名称");
    groupBaseSite.setLayoutData(BorderLayout.WEST);
    formToolkit.adapt(groupBaseSite);
    formToolkit.paintBordersFor(groupBaseSite);

    // BaseSiteTree
    treeBaseSite = new Tree(groupBaseSite, SWT.NONE);
    treeBaseSite.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {

            System.out.println(e.item.toString());
            TreeItem etim = (TreeItem) e.item;
            setBaseID(etim.getText());
          }
        });
    contextService.LoadBaseSiteTree(treeBaseSite);
    treeBaseSite.setBounds(10, 20, 200, 650);
    formToolkit.paintBordersFor(treeBaseSite);
  }