Ejemplo n.º 1
0
  public void valueChanged(TreeSelectionEvent e) {
    MetaElement me = this.getSelectedMetaElement();

    if ((me != null) && (status != null)) {
      status.setStatus("Element '" + me.getName() + "' selected.", true);
    }
  }
Ejemplo n.º 2
0
  private void initElement(DefaultMutableTreeNode parent, MetaElement element) {
    DefaultMutableTreeNode node;

    for (MetaNode child : element.getChildren()) {
      if (child instanceof MetaElement) {
        node = new DefaultMutableTreeNode(child);
        this.model.insertNodeInto(node, parent, parent.getChildCount());
        this.initElement(node, (MetaElement) child);
      }
    }
  }