コード例 #1
0
  @Override
  protected boolean createKeys(List<GElement> list) {
    /*
    Element curElement = XmlHelper.findFirstChildElement(gTreeNode);
    while (curElement != null) {
    list.add(curElement);
    curElement = XmlHelper.findNextSiblingElement(curElement);
    }
    */

    list.addAll(gTreeNode.getElements());
    return true;
  }
コード例 #2
0
 @Override
 protected Node createNodeForKey(GElement gTreeNode) {
   String nodeName = gTreeNode.getType().toString();
   if (nodeName.equals("useStyles")) {
     return new NiftyStyleRefNode(gTreeNode);
   } else if (nodeName.equals("useControls")) {
     return new NiftyControlDefNode(gTreeNode);
   } else if (nodeName.equals("useControls")) {
     return new AbstractNode(Children.LEAF);
   } else if (nodeName.equals("screen")) {
     return new NiftyScreenNode(gTreeNode);
   } else if (nodeName.equals("layer")) {
     return new NiftyLayerNode(gTreeNode);
   } else if (nodeName.equals("control") || nodeName.equals("text")) {
     return new NiftyControlNode(gTreeNode);
   } else {
     return new NiftyElementNode(gTreeNode);
   }
 }
コード例 #3
0
 public NiftyControlNode(GElement gTreeNode) {
   super(Children.create(new NiftyNodeFactory(gTreeNode), true), Lookups.singleton(gTreeNode));
   setDisplayName("Control " + gTreeNode.getAttribute("id"));
 }