Ejemplo n.º 1
0
  /**
   * Translate this element and all contained elements into SAX events. The events should be routed
   * to the contentHandler found in the WingContext.
   *
   * @param contentHandler (Required) The registered contentHandler where SAX events should be
   *     routed too.
   * @param lexicalHandler (Required) The registered lexicalHandler where lexical events (such as
   *     CDATA, DTD, etc) should be routed too.
   * @param namespaces (Required) SAX Helper class to keep track of namespaces able to determine the
   *     correct prefix for a given namespace URI.
   */
  public void toSAX(
      ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces)
      throws SAXException {

    if (!this.merged) {
      AttributeMap attributes = new AttributeMap();
      attributes.put(A_NAME, this.name);
      attributes.put(A_ID, this.context.generateID(E_LIST, this.name));
      if (this.type != null) {
        attributes.put(A_TYPE, this.type);
      }
      if (this.rend != null) {
        attributes.put(A_RENDER, this.rend);
      }

      startElement(contentHandler, namespaces, E_LIST, attributes);
    }

    if (!childMerged && head != null) {
      head.toSAX(contentHandler, lexicalHandler, namespaces);
    }

    for (AbstractWingElement content : contents) {
      content.toSAX(contentHandler, lexicalHandler, namespaces);
    }

    if (!this.merged) {
      endElement(contentHandler, namespaces, E_LIST);
    }
  }
Ejemplo n.º 2
0
 /**
  * Translate this element and all contained elements into SAX events. The events should be routed
  * to the contentHandler found in the WingContext.
  *
  * <p>This method does not create an inclosing block, the implementors of container class need to
  * implement a method of toSAX() that provides the surrounding element block for that specific
  * application.
  *
  * @param contentHandler (Required) The registered contentHandler where SAX events should be
  *     routed too.
  * @param lexicalHandler (Required) The registered lexicalHandler where lexical events (such as
  *     CDATA, DTD, etc) should be routed too.
  * @param namespaces (Required) SAX Helper class to keep track of namespaces able to determine the
  *     correct prefix for a given namespace URI.
  */
 public void toSAX(
     ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces)
     throws SAXException {
   for (AbstractWingElement content : contents) {
     content.toSAX(contentHandler, lexicalHandler, namespaces);
   }
 }
Ejemplo n.º 3
0
  /** Dispose */
  public void dispose() {

    if (this.contents != null) {
      for (AbstractWingElement element : contents) {
        element.dispose();
      }
      this.contents.clear();
    }
    this.contents = null;
    super.dispose();
  }
Ejemplo n.º 4
0
 /** dispose */
 public void dispose() {
   if (head != null) {
     head.dispose();
   }
   head = null;
   for (AbstractWingElement content : contents) {
     content.dispose();
   }
   contents.clear();
   contents = null;
   super.dispose();
 }
Ejemplo n.º 5
0
 /** dispose */
 public void dispose() {
   super.dispose();
 }
Ejemplo n.º 6
0
 /** dispose */
 public void dispose() {
   // Nothing to clean up.
   super.dispose();
 }