コード例 #1
0
 static {
   TextPropertyDescriptor t1 = new TextPropertyDescriptor(ID_X, "X");
   t1.setValidator(NumberCellEditorValidator.INSTANCE());
   TextPropertyDescriptor t2 = new TextPropertyDescriptor(ID_Y, "Y");
   t2.setValidator(NumberCellEditorValidator.INSTANCE());
   t2.setLabelProvider(TextPropertyLabelProvider.INSTANCE());
   t1.setLabelProvider(TextPropertyLabelProvider.INSTANCE());
   descriptor = new IPropertyDescriptor[] {t1, t2};
 }
コード例 #2
0
  public void recursiveInitProperties(Node node) {
    NodeList children = dom.getChildElements(node);
    for (int j = 0; j < children.getLength(); j++) {
      if (!children.item(j).getNamespaceURI().equals(rngaURI)) {
        if (dom.hasQName(children.item(j), "rng:ref")) {
          if (isCountValue(children.item(j))) {
            Relax2Hybrid transform1 = new Relax2Hybrid();
            try {
              transform1.transform(srcDoc, dom, children.item(j));
              // now resolve the rng:ref
              transform1.retrieveRelaxNGRef((Element) children.item(j));
            } catch (DOMTransformException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
            }
          } else continue;
          recursiveInitProperties(node);

        } else if (dom.hasQName(children.item(j), "swe:value")) {
          nameDescriptor = new TextPropertyDescriptor(PROPERTY_COUNT_VALUE, "name");

          PropertyLabelProvider plp = new PropertyLabelProvider(node, dom);
          nameDescriptor.setLabelProvider(plp);
          nameDescriptor.setCategory(node.getLocalName());

        } else {
          recursiveInitProperties(children.item(j));
        }
      }
    }
  }