public void actionPerformed(java.awt.event.ActionEvent evt) {
      try {
        dObj.setChangedFromUI(true);
        WSWebExt webext = dObj.getWebExt();
        ExtendedServletsType es = new ExtendedServletsType();
        es.setDefaults();
        int number = webext.getExtendedServlets().length + 1;
        long time_id = java.lang.System.currentTimeMillis();

        es.setExtendedServlet("");
        es.setXmiId("ServletExtension_" + time_id);
        es.setHref("");

        // rr.setTitle("Binding Item #"+number);
        webext.addExtendedServlets(es);
        //////////////////////////////////
        Node servletNode = new ServletsNode();
        view.getRoot().getChildren().add(new Node[] {servletNode});
        servletNode.setDisplayName(servletNode.getDisplayName() + number);

        dObj.modelUpdatedFromUI();
        SectionPanel sectionPanel = new SectionPanel(view, servletNode, es);
        sectionPanel.setHeaderActions(new javax.swing.Action[] {removeServletAction});
        ((WSWebExtView) view).getServletsContainer().addSection(sectionPanel, true);
        dObj.setChangedFromUI(false);

      } catch (java.io.IOException ex) {
      } catch (java.lang.IllegalArgumentException ex) {
      }
    }
    private Node createServletsNode() {
      ExtendedServletsType[] servlets = webext.getExtendedServlets();
      Children servch = new Children.Array();
      Node[] servletNode = null;

      if (servlets != null && servlets.length > 0) {
        servletNode = new Node[servlets.length];
        for (int i = 0; i < servlets.length; i++) {
          servletNode[i] = new ServletsNode();
          servletNode[i].setDisplayName("Extended Servlet #" + (i + 1));
        }
        servch.add(servletNode);
      }

      Node servletsNode = new SectionContainerNode(servch);
      servletsNode.setDisplayName("Extended Servlets");

      servletsCont = new SectionContainer(this, servletsNode, "Extended Servlets");
      servletsCont.setHeaderActions(new javax.swing.Action[] {addServletAction});

      // creatings section panels for ResRefs
      if (servlets != null) {
        SectionPanel[] pan = new SectionPanel[servlets.length];
        for (int i = 0; i < servlets.length; i++) {
          pan[i] = new SectionPanel(this, servletNode[i], servlets[i]);
          pan[i].setHeaderActions(new javax.swing.Action[] {removeServletAction});
          servletsCont.addSection(pan[i]);
        }
      }
      addSection(servletsCont);
      return servletsNode;
    }
Example #3
0
 Explorer(Service service) {
   this.roots = new Children.Array();
   roots.add(new Node[] {new ServiceNode(service)});
   Node root = new AbstractNode(roots);
   root.setDisplayName("Root"); // Not visible
   this.manager = new ExplorerManager();
   this.manager.setRootContext(root);
   initialize();
 }
  @Override
  protected Node[] createNodes(Object key) {

    final Enterprise enterprise1 = (Enterprise) key;
    Node result;
    result =
        new AbstractNode(new EnterpriseChildren(enterprise1), Lookups.singleton(enterprise1)) {

          @Override
          protected Sheet createSheet() {
            Sheet sheet = Sheet.createDefault();
            Sheet.Set set = Sheet.createPropertiesSet();

            Property giamDocProperty =
                new PropertySupport.ReadOnly<String>(Giamdoc_PROPERTY, String.class, "Thu", "aaa") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateSumImportByEnterprise(enterprise1));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(giamDocProperty);
            Property congTyMeProperty =
                new PropertySupport.ReadOnly<String>(
                    Congtyme_PROPERTY, String.class, "Chi", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateSumExportByEnterprise(enterprise1));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(congTyMeProperty);
            sheet.put(set);
            return sheet;
          }
        };

    result.setDisplayName(enterprise1.getEnterpriseName());
    return new Node[] {result};
  }
Example #5
0
 public ZIPExplorer() {
   setName(Bundle.CTL_ZIPTopComponent());
   setToolTipText(Bundle.HINT_ZIPTopComponent());
   setLayout(new BorderLayout());
   Node rootNode = new AbstractNode(Children.create(new ZIPChildFactory(), false));
   rootNode.setDisplayName("Root");
   BeanTreeView btv = new BeanTreeView();
   btv.setRootVisible(false);
   add(btv, BorderLayout.CENTER);
   ActionMap map = this.getActionMap();
   map.put(DefaultEditorKit.copyAction, ExplorerUtils.actionCopy(mgr));
   map.put(DefaultEditorKit.cutAction, ExplorerUtils.actionCut(mgr));
   map.put(DefaultEditorKit.pasteAction, ExplorerUtils.actionPaste(mgr));
   map.put("delete", ExplorerUtils.actionDelete(mgr, true)); // or false
   mgr.setRootContext(rootNode);
   associateLookup(ExplorerUtils.createLookup(mgr, map));
 }
  @Override
  protected Node createNodeForKey(final Message key) {
    Node node =
        new AbstractNode(
            Children.LEAF,
            Lookups.fixed(
                key,
                new OpenCookie() {

                  @Override
                  public void open() {
                    MsgDetailsTopComponent win = MsgDetailsTopComponent.findInstance();
                    win.open();
                  }
                })) {

          @Override
          public SystemAction[] getActions() {
            SystemAction[] saa = new SystemAction[2];
            saa[0] = SystemAction.get(OpenAction.class);
            saa[1] = SystemAction.get(DeleteAction.class);
            return saa;
          }

          @Override
          public boolean canDestroy() {
            return true;
          }

          @Override
          public void destroy() throws IOException {
            MessageBoardClient client = new MessageBoardClient();
            client.deleteMessage(key);
            ExplorerTopComponent.refresh();
          }
        };
    node.setDisplayName(key.getMessage());
    node.setShortDescription(key.getCreated().toString());
    return node;
  }
    WSWebExtView(WSWebExtDataObject dObj) {
      super(factory);

      Children rootChildren = new Children.Array();
      Node root = new AbstractNode(rootChildren);
      try {
        this.webext = dObj.getWebExt();
        rootChildren.add(new Node[] {createWebExtAttrNode(), createServletsNode()});
        /*
        rootChildren.add(new Node[]{
            createWebExtAttrNode(),
            createResRefNode(),
            createEjbRefNode(),
            createResEnvRefNode()}
        );*/
      } catch (java.io.IOException ex) {
        System.out.println("ex=" + ex);
        root.setDisplayName("Invalid WebExt");
      } finally {
        setRoot(root);
      }
    }
Example #8
0
  @Override
  protected Node[] createNodes(Object key) {

    final Enterprise enterprise1 = (Enterprise) key;
    Node result;
    result =
        new AbstractNode(new EnterpriseChildren(enterprise1), Lookups.singleton(enterprise1)) {

          @Override
          protected Sheet createSheet() {
            Sheet sheet = Sheet.createDefault();
            Sheet.Set set = Sheet.createPropertiesSet();

            Property thuMonth1Property =
                new PropertySupport.ReadOnly<String>(
                    ThuMonth1_PROPERTY, String.class, "ThuM1", "aaa") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateImportByMonth(enterprise1, month1));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(thuMonth1Property);
            Property chiMonth1Property =
                new PropertySupport.ReadOnly<String>(
                    ChiMonth1_PROPERTY, String.class, "ChiM1", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateExportByMonth(enterprise1, month1));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(chiMonth1Property);
            Property thuMonth2Property =
                new PropertySupport.ReadOnly<String>(
                    ThuMonth2_PROPERTY, String.class, "ThuM2", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateImportByMonth(enterprise1, month2));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(thuMonth2Property);
            Property chiMonth2Property =
                new PropertySupport.ReadOnly<String>(
                    ChiMonth2_PROPERTY, String.class, "ChiM2", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateExportByMonth(enterprise1, month2));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(chiMonth2Property);
            Property thuMonth3Property =
                new PropertySupport.ReadOnly<String>(
                    ThuMonth3_PROPERTY, String.class, "ThuM3", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateImportByMonth(enterprise1, month3));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(thuMonth3Property);
            Property chiMonth3Property =
                new PropertySupport.ReadOnly<String>(
                    ChiMonth3_PROPERTY, String.class, "ChiM3", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateExportByMonth(enterprise1, month3));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(chiMonth3Property);
            Property laiMonth1Property =
                new PropertySupport.ReadOnly<String>(Lai1_PROPERTY, String.class, "LaiM1", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(
                        calculateSPI.calculateImportByMonth(enterprise1, month1)
                            - calculateSPI.calculateExportByMonth(enterprise1, month1));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(laiMonth1Property);
            Property laiMonth2Property =
                new PropertySupport.ReadOnly<String>(Lai2_PROPERTY, String.class, "LaiM2", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(
                        calculateSPI.calculateImportByMonth(enterprise1, month2)
                            - calculateSPI.calculateExportByMonth(enterprise1, month2));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(laiMonth2Property);
            Property lMaionth3Property =
                new PropertySupport.ReadOnly<String>(Lai3_PROPERTY, String.class, "LaiM3", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(
                        calculateSPI.calculateImportByMonth(enterprise1, month3)
                            - calculateSPI.calculateExportByMonth(enterprise1, month3));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(lMaionth3Property);
            Property thuYear1Property =
                new PropertySupport.ReadOnly<String>(
                    ThuYear1_PROPERTY, String.class, "ThuY1", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateImportByYear(enterprise1, year1));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(thuYear1Property);
            Property chiYear1Property =
                new PropertySupport.ReadOnly<String>(
                    ChiYear1_PROPERTY, String.class, "ChiY1", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateExportByYear(enterprise1, year1));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(chiYear1Property);
            Property laiYear1Property =
                new PropertySupport.ReadOnly<String>(
                    LaiYear1_PROPERTY, String.class, "LaiY1", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(
                        calculateSPI.calculateImportByYear(enterprise1, year1)
                            - calculateSPI.calculateExportByYear(enterprise1, year1));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(laiYear1Property);

            Property thuYear2Property =
                new PropertySupport.ReadOnly<String>(
                    ThuYear2_PROPERTY, String.class, "ThuY2", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateImportByYear(enterprise1, year2));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(thuYear2Property);
            Property chiYear2Property =
                new PropertySupport.ReadOnly<String>(
                    ChiYear2_PROPERTY, String.class, "ChiY2", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateExportByYear(enterprise1, year2));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(chiYear2Property);
            Property laiYear2Property =
                new PropertySupport.ReadOnly<String>(
                    LaiYear2_PROPERTY, String.class, "LaiY2", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(
                        calculateSPI.calculateImportByYear(enterprise1, year2)
                            - calculateSPI.calculateExportByYear(enterprise1, year2));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(laiYear2Property);
            Property thuAllProperty =
                new PropertySupport.ReadOnly<String>(
                    ThuAll_PROPERTY, String.class, "ThuAll", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateSumImportByEnterprise(enterprise1));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(thuAllProperty);
            Property chiAllProperty =
                new PropertySupport.ReadOnly<String>(
                    ChiAll_PROPERTY, String.class, "ChiAll", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(calculateSPI.calculateSumExportByEnterprise(enterprise1));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(chiAllProperty);
            Property laiAllProperty =
                new PropertySupport.ReadOnly<String>(
                    LaiAll_PROPERTY, String.class, "LaiAll", "bbb") {

                  @Override
                  public String getValue()
                      throws IllegalAccessException, InvocationTargetException {
                    return String.valueOf(
                        calculateSPI.calculateSumImportByEnterprise(enterprise1)
                            - calculateSPI.calculateSumExportByEnterprise(enterprise1));
                  }

                  @Override
                  public PropertyEditor getPropertyEditor() {
                    return new PropertyEditorSupport();
                  }
                };
            set.put(laiAllProperty);
            sheet.put(set);
            return sheet;
          }
        };
    result.setDisplayName(enterprise1.getEnterpriseName());
    return new Node[] {result};
  }
  @Override
  protected Node[] createNodes(Object key) {
    final Department department1 = (Department) key;

    // Node rootNode = new AbstractNode(new
    // PersonChildren(person1,enterprise),Lookups.singleton(department1));

    if (department1.getEnterpriseID().equals("")) {
      Node rootNode = null;
      rootNode =
          new AbstractNode(
              new PersonParent(department1, enterprise), Lookups.singleton(department1));
      rootNode.setDisplayName("Person");
      return new Node[] {rootNode};
    } else {
      Node result =
          new AbstractNode(
              new DepartmentChildren(department1, enterprise), Lookups.singleton(department1)) {

            @Override
            protected Sheet createSheet() {
              Sheet sheet = Sheet.createDefault();
              Sheet.Set set = Sheet.createPropertiesSet();

              Property giamDocProperty =
                  new PropertySupport.ReadOnly<String>(
                      Giamdoc_PROPERTY, String.class, "Trưởng phòng", "aaa") {

                    @Override
                    public String getValue()
                        throws IllegalAccessException, InvocationTargetException {
                      return department1.getPersonID();
                    }

                    @Override
                    public PropertyEditor getPropertyEditor() {
                      return new PropertyEditorSupport();
                    }
                  };
              set.put(giamDocProperty);
              Property congTyMeProperty =
                  new PropertySupport.ReadOnly<String>(
                      Congtyme_PROPERTY, String.class, "Công ty", "bbb") {

                    @Override
                    public String getValue()
                        throws IllegalAccessException, InvocationTargetException {
                      return department1.getEnterpriseID();
                    }

                    @Override
                    public PropertyEditor getPropertyEditor() {
                      return new PropertyEditorSupport();
                    }
                  };
              set.put(congTyMeProperty);
              sheet.put(set);
              return sheet;
            }
          };

      result.setDisplayName(department1.getDepartmentName());
      return new Node[] {result};
    }
  }
 public final void refreshNode() {
   synchronized (this) {
     node.setDisplayName(getDisplayName());
   }
 }
  @Override
  protected Node[] createNodes(Object key) {
    final Enterprise enterprise1 = (Enterprise) key;
    if (count == 0) {
      count++;
      Node rootNode = null;
      rootNode =
          new AbstractNode(new DepartmentParentAll(enterprise), Lookups.singleton(enterprise)) {
            @Override
            protected Sheet createSheet() {
              Sheet sheet = Sheet.createDefault();
              Sheet.Set set = Sheet.createPropertiesSet();
              this.setIconBaseWithExtension("vn/com/hkt/tree/ui/enterpriseAll/department.gif");
              sheet.put(set);
              return sheet;
            }
          };
      rootNode.setDisplayName("Department");
      return new Node[] {rootNode};
    } else if (count == 1) {
      count++;
      Node rootNode = null;
      rootNode =
          new AbstractNode(new ProductParent(enterprise), Lookups.singleton(enterprise)) {
            @Override
            protected Sheet createSheet() {
              Sheet sheet = Sheet.createDefault();
              Sheet.Set set = Sheet.createPropertiesSet();
              this.setIconBaseWithExtension("vn/com/hkt/tree/ui/enterpriseAll/product.gif");
              sheet.put(set);
              return sheet;
            }
          };
      rootNode.setDisplayName("Product");
      return new Node[] {rootNode};
    } else {
      Node result;
      result =
          new AbstractNode(new EnterpriseChildren(enterprise1), Lookups.singleton(enterprise1)) {

            @Override
            protected Sheet createSheet() {
              Sheet sheet = Sheet.createDefault();
              Sheet.Set set = Sheet.createPropertiesSet();

              Property giamDocProperty =
                  new PropertySupport.ReadOnly<String>(
                      Giamdoc_PROPERTY, String.class, "Trưởng phòng", "aaa") {

                    @Override
                    public String getValue()
                        throws IllegalAccessException, InvocationTargetException {
                      Person p = new PersonBN().getById(enterprise1.getDirectorIdActual());
                      return p.getPersonName();
                    }

                    @Override
                    public PropertyEditor getPropertyEditor() {
                      return new PropertyEditorSupport();
                    }
                  };
              set.put(giamDocProperty);
              Property congTyMeProperty =
                  new PropertySupport.ReadOnly<String>(
                      Congtyme_PROPERTY, String.class, "Công ty", "bbb") {

                    @Override
                    public String getValue()
                        throws IllegalAccessException, InvocationTargetException {
                      Enterprise enterprise =
                          new EnterpriseBN().getById(enterprise1.getEnterpriseParentIdActual());
                      return enterprise.getEnterpriseName();
                    }

                    @Override
                    public PropertyEditor getPropertyEditor() {
                      return new PropertyEditorSupport();
                    }
                  };
              set.put(congTyMeProperty);
              sheet.put(set);
              return sheet;
            }
          };

      result.setDisplayName(enterprise1.getEnterpriseName());
      return new Node[] {result};
    }
  }
  @Override
  protected Node[] createNodes(Object key) {

    final Product product1 = (Product) key;
    Node result = null;
    //        result = new AbstractNode(new ProductChildrenTongQuan(product1, enterprise),
    // Lookups.singleton(product1)) {
    //
    //            @Override
    //            protected Sheet createSheet() {
    //                Sheet sheet = Sheet.createDefault();
    //                Sheet.Set set = Sheet.createPropertiesSet();
    //
    //                Property thuMonth1Property = new
    // PropertySupport.ReadOnly<String>(ThuMonth1_PROPERTY, String.class, "ThuM1", "aaa") {
    //
    //                    @Override
    //                    public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                        return
    // String.valueOf(calculateSPI.calculateImportByMonthOfProduct(enterprise, product1, month1));
    //                    }
    //
    //                    @Override
    //                    public PropertyEditor getPropertyEditor() {
    //                        return new PropertyEditorSupport();
    //                    }
    //                };
    //                set.put(thuMonth1Property);
    //                Property chiMonth1Property =
    //                        new PropertySupport.ReadOnly<String>(ChiMonth1_PROPERTY, String.class,
    // "ChiM1", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateExportByMonthOfProduct(enterprise, product1, month1));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(chiMonth1Property);
    //                Property thuMonth2Property =
    //                        new PropertySupport.ReadOnly<String>(ThuMonth2_PROPERTY, String.class,
    // "ThuM2", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateImportByMonthOfProduct(enterprise, product1, month2));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(thuMonth2Property);
    //                Property chiMonth2Property =
    //                        new PropertySupport.ReadOnly<String>(ChiMonth2_PROPERTY, String.class,
    // "ChiM2", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateExportByMonthOfProduct(enterprise, product1, month2));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(chiMonth2Property);
    //                Property thuMonth3Property =
    //                        new PropertySupport.ReadOnly<String>(ThuMonth3_PROPERTY, String.class,
    // "ThuM3", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateImportByMonthOfProduct(enterprise, product1, month3));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(thuMonth3Property);
    //                Property chiMonth3Property =
    //                        new PropertySupport.ReadOnly<String>(ChiMonth3_PROPERTY, String.class,
    // "ChiM3", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateExportByMonthOfProduct(enterprise, product1, month3));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(chiMonth3Property);
    //                Property laiMonth1Property =
    //                        new PropertySupport.ReadOnly<String>(Lai1_PROPERTY, String.class,
    // "LaiM1", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateImportByMonthOfProduct(enterprise, product1, month1) -
    // calculateSPI.calculateExportByMonthOfProduct(enterprise, product1, month1));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(laiMonth1Property);
    //                Property laiMonth2Property =
    //                        new PropertySupport.ReadOnly<String>(Lai2_PROPERTY, String.class,
    // "LaiM2", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateImportByMonthOfProduct(enterprise, product1, month2) -
    // calculateSPI.calculateExportByMonthOfProduct(enterprise, product1, month2));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(laiMonth2Property);
    //                Property lMaionth3Property =
    //                        new PropertySupport.ReadOnly<String>(Lai3_PROPERTY, String.class,
    // "LaiM3", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateImportByMonthOfProduct(enterprise, product1, month3) -
    // calculateSPI.calculateExportByMonthOfProduct(enterprise, product1, month3));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(lMaionth3Property);
    //                Property thuYear1Property =
    //                        new PropertySupport.ReadOnly<String>(ThuYear1_PROPERTY, String.class,
    // "ThuY1", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateImportByYearOfProduct(enterprise, product1, year1));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(thuYear1Property);
    //                Property chiYear1Property =
    //                        new PropertySupport.ReadOnly<String>(ChiYear1_PROPERTY, String.class,
    // "ChiY1", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateExportByYearOfProduct(enterprise, product1, year1));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(chiYear1Property);
    //                Property laiYear1Property =
    //                        new PropertySupport.ReadOnly<String>(LaiYear1_PROPERTY, String.class,
    // "LaiY1", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateImportByYearOfProduct(enterprise, product1, year1) -
    // calculateSPI.calculateExportByYearOfProduct(enterprise, product1, year1));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(laiYear1Property);
    //
    //                Property thuYear2Property =
    //                        new PropertySupport.ReadOnly<String>(ThuYear2_PROPERTY, String.class,
    // "ThuY2", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateImportByYearOfProduct(enterprise, product1, year2));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(thuYear2Property);
    //                Property chiYear2Property =
    //                        new PropertySupport.ReadOnly<String>(ChiYear2_PROPERTY, String.class,
    // "ChiY2", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateExportByYearOfProduct(enterprise, product1, year2));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(chiYear2Property);
    //                Property laiYear2Property =
    //                        new PropertySupport.ReadOnly<String>(LaiYear2_PROPERTY, String.class,
    // "LaiY2", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateImportByYearOfProduct(enterprise, product1, year2) -
    // calculateSPI.calculateExportByYearOfProduct(enterprise, product1, year2));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(laiYear2Property);
    //                Property thuAllProperty =
    //                        new PropertySupport.ReadOnly<String>(ThuAll_PROPERTY, String.class,
    // "ThuAll", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateImportAllOfProduct(enterprise, product1));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(thuAllProperty);
    //                Property chiAllProperty =
    //                        new PropertySupport.ReadOnly<String>(ChiAll_PROPERTY, String.class,
    // "ChiAll", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateExportAllOfProduct(enterprise, product1));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(chiAllProperty);
    //                Property laiAllProperty =
    //                        new PropertySupport.ReadOnly<String>(LaiAll_PROPERTY, String.class,
    // "LaiAll", "bbb") {
    //
    //                            @Override
    //                            public String getValue() throws IllegalAccessException,
    // InvocationTargetException {
    //                                return
    // String.valueOf(calculateSPI.calculateImportAllOfProduct(enterprise, product1) -
    // calculateSPI.calculateExportAllOfProduct(enterprise, product1));
    //                            }
    //
    //                            @Override
    //                            public PropertyEditor getPropertyEditor() {
    //                                return new PropertyEditorSupport();
    //                            }
    //                        };
    //                set.put(laiAllProperty);
    //                sheet.put(set);
    //                return sheet;
    //            }
    //        };
    result.setDisplayName(product1.getProductName());
    return new Node[] {result};
  }