[Laszlo-checkins] r13683 - openlaszlo/trunk/WEB-INF/lps/lfc/data

bargull@openlaszlo.org bargull at openlaszlo.org
Wed Apr 15 02:29:42 PDT 2009


Author: bargull
Date: 2009-04-15 02:29:32 -0700 (Wed, 15 Apr 2009)
New Revision: 13683

Removed:
   openlaszlo/trunk/WEB-INF/lps/lfc/data/platform/
Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataNode.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs
Log:
Change 20090414-bargull-8ks by bargull at dell--p4--2-53 on 2009-04-14 23:21:22
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: update java docs for lfc-data

New Features:

Bugs Fixed: LPP-8054 (update lfc-data docs)

Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: hminsky

Documentation:

Release Notes:

Details:
LzDataNode:
- updated example code to use lz.* instead of Lz*
- added DOCUMENT_NODE to nodeType description, changed @keywords abstract (?) to @keywords read-only
- added description for parentNode
- added description for ownerDocument
- childNodes type to [LzDataNodeMixin]
- added minimal description to internal attributes (__LZo, __LZcoDirty, sel)
- changed @lzxdefault for DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE to proper type

LzDataElement:
- changed formatting for lz.DataElement summary to be more compact
- changed @lzxdefault for DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE to proper type

LzDataText:
- changed formatting for lz.DataText summary to be more compact
- added @lzxdefault and @keywords read-only to nodeName
- added @lzxdefault to data

Removed (now) unused directory lfc/data/platform
    

Tests:



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs	2009-04-15 08:00:09 UTC (rev 13682)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs	2009-04-15 09:29:32 UTC (rev 13683)
@@ -12,6 +12,8 @@
   * @shortdesc A node of hierarchical data.
   * @see LzDataNodeMixin LzDataText LzDataPointer
   * @access public
+  *
+  * @devnote W3C-DOM Element interface: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-745549614
   */
 mixin LzDataElementMixin {
     // N.B.: LzDataElementMixin may or may not be an LzNode, so
@@ -215,7 +217,7 @@
     var n:LzDataElement = new LzDataElement(this.nodeName);
     n.$lzc$set_attributes( this.attributes );
     if ( deep ){
-        for ( var i:int = 0 ; i < this.childNodes.length; i++ ){
+        for ( var i:int = 0; i < this.childNodes.length; i++ ){
             n.appendChild( this.childNodes[ i ].cloneNode( true ) );
         }
     }
@@ -684,7 +686,10 @@
 
 /**
   * <p>
-  * An <code>lz.DataElement</code> represents a node a in a hierarchical dataset. An <code>lz.DataElement</code> can contain other <code>lz.DataElements</code>, or <sgmltag class="element" role="LzDataText">lz.DataText</sgmltag>, which represents a text node. See the example on <sgmltag class="element" role="LzDataNodeMixin">lz.DataNodeMixin</sgmltag>. 
+  * An <code>lz.DataElement</code> represents a node a in a hierarchical dataset.
+  * An <code>lz.DataElement</code> can contain other <code>lz.DataElements</code>,
+  * or <sgmltag class="element" role="LzDataText">lz.DataText</sgmltag>, which
+  * represents a text node. See the example on <sgmltag class="element" role="LzDataNodeMixin">lz.DataNodeMixin</sgmltag>. 
   * </p>
   *
   * @shortdesc A node of hierarchical data.
@@ -775,19 +780,19 @@
 
 /** constant for LZX DOM data element node type 
   * @type int
-  * @lzxdefault "1"
+  * @lzxdefault 1
   * @keywords read-only
   */
 static const ELEMENT_NODE :int = 1;
 /** constant for LZX DOM data text node type 
   * @type int
-  * @lzxdefault "3"
+  * @lzxdefault 3
   * @keywords read-only
   */
 static const TEXT_NODE :int = 3;
 /** constant for LZX DOM document root node type  
   * @type int
-  * @lzxdefault "9"
+  * @lzxdefault 9
   * @keywords read-only
   */
 static const DOCUMENT_NODE :int = 9;
@@ -796,7 +801,7 @@
   * since flash it's just for escaping &gt;&lt;
   * @access private
   */
-static const __LZescapechars :Object = 
+static const __LZescapechars :Object =
 { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&apos;'};
 
 
@@ -851,9 +856,10 @@
     return null;
 }
 
-/** @type Dictionary 
-  * @keywords read-only 
-  * @access private */
+/** @type Dictionary
+  * @keywords read-only
+  * @access private
+  */
 static const whitespaceChars :Object = {' ': true, '\r': true, '\n': true, '\t': true};
 
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataNode.lzs	2009-04-15 08:00:09 UTC (rev 13682)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataNode.lzs	2009-04-15 09:29:32 UTC (rev 13683)
@@ -11,49 +11,46 @@
 /**
   * <p><classname>lz.DataNode</classname> is the base class for the classes
   * that represent OpenLaszlo's hierarchical data format.</p>
-  * 
+  *
   * <example>
   * &lt;canvas height="300"&gt;
   *   &lt;simplelayout axis="y"/&gt;
-  * 
-  *   &lt;text width="300" height="250" bgcolor="silver" 
+  *
+  *   &lt;text width="300" height="250" bgcolor="silver"
   *         multiline="true" name="display"/&gt;
   *   &lt;button&gt;Make some data
   *     &lt;attribute name="currentstep" value="0"/&gt;
   * 
   *     &lt;handler name="onclick"&gt;
-  *       &lt;![CDATA[ 
-  *       switch(currentstep ++){
+  *       &lt;![CDATA[
+  *       switch (this.currentstep++) {
   *         case 0:
-  *           this.n = <em>new LzDataElement('numbers');</em>
-  *           setAttribute('text', 'Add some children');
+  *           this.n = <em>new lz.DataElement('numbers');</em>
+  *           this.setAttribute('text', 'Add some children');
   *           break;
   *         case 1:
-  *           for (var i = 1; i &lt; 11 ; i++){
-  *             <em>this.n.appendChild(new LzDataElement('number' , 
-  *                                                      {value : i}));</em>
-  * 
+  *           for (var i = 1; i &lt; 11; i++) {
+  *             <em>this.n.appendChild(new lz.DataElement('number', {value : i}));</em>
   *           }
-  *           setAttribute('text', 'Add linebreaks');
+  *           this.setAttribute('text', 'Add linebreaks');
   *           break;
   *         case 2:
-  *           var dp = new LzDatapointer();
+  *           var dp = new lz.datapointer();
   *           dp.setPointer(this.n.getFirstChild());
   *           do {
-  *             <em>dp.p.parentNode.insertBefore(new LzDataText('\n'), 
-  *                                              dp.p);</em>
+  *             <em>dp.p.parentNode.insertBefore(new lz.DataText('\n'), dp.p);</em>
   *           } while (dp.selectNext())
-  *           dp.p.parentNode.appendChild(new LzDataText('\n')); 
-  *           setAttribute('visible', false);
+  *           dp.p.parentNode.appendChild(new lz.DataText('\n'));
+  *           this.setAttribute('visible', false);
   *           break;
   *       }
-  *       display.setText(display.escapeText(n.serialize()));
+  *       canvas.display.setAttribute('text', canvas.display.escapeText(n.serialize()));
   *       ]]&gt;
   *     &lt;/handler&gt;
   *   &lt;/button&gt;
   * &lt;/canvas&gt;
   * </example>
-  * 
+  *
   * @shortdesc The base class for a node of hierarchical data.
   * @devnote LzDataNodeMixin is the abstract baseclass for LzDataElement and LzDataText.
   * N.B.: LzDataNodeMixin may or may not be an LzNode, so _if_ it were
@@ -63,8 +60,9 @@
   * @devnote Also N.B.: If this _does_ descend from LzNode and has initial
   * data, childNodes will have already been set by applyArgs, so
   * don't set it here!
+  *
+  * @devnote W3C-DOM Node interface: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-1950641247
   */
-
 mixin LzDataNodeMixin {
 /** @lzxtype event */
 var onownerDocument :LzDeclaredEventClass = LzDeclaredEvent;
@@ -81,29 +79,52 @@
 /** @lzxtype event */
 var onnodeName :LzDeclaredEventClass = LzDeclaredEvent;
 
-/** The type of this node -- ELEMENT_NODE or TEXT_NODE
+/**
+  * The type of this node -- one of <code>lz.DataElement.DOCUMENT_NODE</code>,
+  * <code>lz.DataElement.ELEMENT_NODE</code> or <code>lz.DataElement.TEXT_NODE</code>
   * @type int
-  * @keywords abstract
+  * @keywords read-only
   */
 var nodeType :int; // This is undefined. Set elsewhere
 
-var parentNode :* = null;
+/**
+  * The parent of this node
+  * @type LzDataElementMixin
+  * @keywords read-only
+  */
+var parentNode /*:LzDataElementMixin*/ = null;
 
+/**
+  * The document object of this node
+  * @type LzDataElementMixin
+  * @keywords read-only
+  */
 var ownerDocument :LzDataElementMixin;
 
-/** @access private */
+/**
+  * An array of children of this node
+  * @type [LzDataNodeMixin]
+  */
+var childNodes :Array = null;
+
+/**
+  * The offset of this node in the parentNode's childNodes array
+  * @access private
+  */
 var __LZo :int = -1;
-/** @access private */
-var sel :Boolean = false;
 
-/** An array of children of this node
-  * @type LzDataNodeMixin
+/**
+  * Quick check for __LZo, see getOffset()
+  * @access private
   */
-var childNodes :Array = null;
-
-/** @access private */
 var __LZcoDirty :Boolean = true;
 
+/**
+  * Selection state of this node, see LzDataSelectionManager
+  * @access private
+  */
+var sel :Boolean = false;
+
 /** 
   * @devnote: used to track view-sizes, see LzResizeReplicationManager
   * @access private
@@ -119,7 +140,7 @@
 }
 
 /**
-  * gets offset of node in parent's childNodes array
+  * Gets offset of node in parent's childNodes array
   * @return int
   */
 public function getOffset () :int {
@@ -130,8 +151,8 @@
 }
 
 /**
-  * Returns the sibling before this one this node's parentNodes List of children
-  * @return LzDataNodeMixin: The node preceeding this one in this node's childNodes
+  * Returns the sibling before this one in this node's parentNodes list of children
+  * @return LzDataNodeMixin: The node immediately preceeding this node
   */
 public function getPreviousSibling () /*:LzDataNodeMixin*/ {
     if (!this.parentNode) return null;
@@ -145,8 +166,8 @@
 }
 
 /**
-  * Returns the sibling after this one this node's parentNodes List of children
-  * @return LzDataNodeMixin: The node succeeding this one in this node's childNodes
+  * Returns the sibling after this one in this node's parentNodes list of children
+  * @return LzDataNodeMixin: The node immediately succeeding this node
   */
 public function getNextSibling () /*:LzDataNodeMixin*/ {
     if (!this.parentNode) return null;
@@ -159,8 +180,6 @@
     return [ this.parentNode , "childNodes" , this , "parentNode" ];
 }
 
-
-
 /** @access private
   * Renamed from childOf to avoid conflict with LzNode.childOf.
   * childOf still exists because it is part of the public API.
@@ -200,9 +219,9 @@
 }
 
 /**
-  * Sets the LzDataNodeMixin which is the ownerDocument for this node.
-  * @param LzDataNodeMixin ownerDoc: The LzDataNodeMixin to act as the ownerDocument for
-  * this node.
+  * Sets the lz.DataElementMixin which is the ownerDocument for this node.
+  * @param LzDataElementMixin ownerDoc: The lz.DataElementMixin to act as the
+  * ownerDocument for this node.
   * @deprecated Use setAttribute('ownerDocument', ...) instead.
   */
 public final function setOwnerDocument (ownerDoc) :void {
@@ -232,6 +251,7 @@
 
 /**
   * @access private
+  * @see LzDatapath
   */
 function __LZlockFromUpdate (locker:LzDatapath) :void {
     this.ownerDocument.__LZdoLock( locker );
@@ -239,6 +259,7 @@
 
 /**
   * @access private
+  * @see LzDatapath
   */
 function __LZunlockFromUpdate (locker:LzDatapath) :void {
     this.ownerDocument.__LZdoUnlock( locker );
@@ -288,21 +309,21 @@
 
 /** @deprecated Use <code>LzDataElement.ELEMENT_NODE</code> instead
   * @type int
-  * @lzxdefault "1"
+  * @lzxdefault 1
   * @keywords read-only
   */
 static const ELEMENT_NODE :int = 1;
 
 /** @deprecated Use <code>LzDataElement.TEXT_NODE</code> instead
   * @type int
-  * @lzxdefault "3"
+  * @lzxdefault 3
   * @keywords read-only
   */
 static const TEXT_NODE :int = 3;
 
 /** @deprecated Use <code>LzDataElement.DOCUMENT_NODE</code> instead
   * @type int
-  * @lzxdefault "9"
+  * @lzxdefault 9
   * @keywords read-only
   */
 static const DOCUMENT_NODE :int = 9;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs	2009-04-15 08:00:09 UTC (rev 13682)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs	2009-04-15 09:29:32 UTC (rev 13683)
@@ -1,6 +1,6 @@
 /**
   *
-  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @access public
@@ -9,10 +9,15 @@
   */
 
 /**
-  * An <code>lz.DataText</code> represents a text node a in a hierarchical dataset. An <code>lz.DataText</code> can only contain text data. It can be a child a of an <sgmltag class="element" role="LzDataElement">lz.DataElement</sgmltag>. See the example on <sgmltag class="element" role="LzDataNodeMixin">lz.DataNodeMixin</sgmltag>. 
+  * An <code>lz.DataText</code> represents a text node a in a hierarchical
+  * dataset. An <code>lz.DataText</code> can only contain text data. It can be
+  * a child a of an <sgmltag class="element" role="LzDataElement">lz.DataElement</sgmltag>.
+  * See the example on <sgmltag class="element" role="LzDataNodeMixin">lz.DataNodeMixin</sgmltag>.
   *
   * @shortdesc Represents a text node in a set of data.
   * @see lzdatanodemixin, lzdataelement, datapointer
+  *
+  * @devnote W3C-DOM Text interface: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-1312295772
   */
 class LzDataText extends LzDataNode with LzDataNodeMixin {
 
@@ -29,19 +34,24 @@
 /** @lzxtype event */
 var ondata :LzDeclaredEventClass = LzDeclaredEvent;
 
-/** This property is of type String, can raise a DOMException object on setting
-  * and can raise a DOMException object on retrieval. */
+/** This property is of type int, can raise a DOMException object on setting
+  * and can raise a DOMException object on retrieval.
+  */
 //var nodeType = LzDataElement.TEXT_NODE;
 
 /** The name of this node.
- * According to <a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-1841493061">W3C-specs</a>, nodeName for LzDataText should return
- * "#text".
+  * According to <a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-1841493061">W3C-specs</a>,
+  * nodeName for LzDataText should return "#text".
   * @type String
+  * @lzxdefault "#text"
+  * @keywords read-only
   */
 var nodeName :String = '#text';
 
 /** The data held by this node.
-  * @type String */
+  * @type String
+  * @lzxdefault ""
+  */
 var data :String = "";
 
 /** @access private */
@@ -75,8 +85,7 @@
   * @access private
   */
 override public function cloneNode ( deep:Boolean = false ) :LzDataNodeMixin {
-    var n = new LzDataText(this.data);
-    return n;
+    return new LzDataText(this.data);
 }
 
 /**



More information about the Laszlo-checkins mailing list