getChild(), adoptChild(), getParent(), etc.| Field Summary | |
|---|---|
| static int | The number of milliseconds before asynchronous component loads time out. |
| static String | Minimum supported version CIF formatted serialization files |
| static String | Minimum supported version for serialization files
|
| static int | The normal load type for a DOM branch. |
| static int | Load type indicating that the DOM branch will deserialize and paint as needed when it becomes visible. |
| static int | Load type indicating that the DOM branch will paint as needed when it becomes visible. |
| static int | Load type indicating that the DOM branch will deserialize and paint after its parent deserializes and the
call stack resets. |
| static int | Load type indicating that the DOM branch will paint after its parent paints and the call stack resets. |
| static int | Load type indicating that the DOM branch will deserialize after its parent deserializes and the call stack
resets and will paint after its parent paints and the call stack resets. |
| static Object<String, boolean> | The allowed meta data fields. |
| static int | Normal persistance value for a child that will be persisted. |
| static int | Persistance value fora child that is temporarily part of the DOM tree and will not be persisted. |
| static int | Persistance value for a child that exists in an external serialization file and is referenced by URI. |
| static int | Persistance value for a child that exists in an external serialization file and is referenced by URI. |
| Constructor Summary | |
|---|---|
| void | The instance initializer. |
| Method Summary | |
|---|---|
| void | Appends a DOM node to this object after removing the node from its former parent reference. |
| boolean | assembleFromXML(objElm : jsx3.xml.Entity) Builds this object from its serialized XML representation. |
| jsx3.app.Model | Creates and returns an exact replica of the object. |
| jsx3.app.Model | Returns the first ancestor passing the given test function. |
| jsx3.app.Model | Array<jsx3.app.Model> | findDescendants(fctTest : Function, bDepthFirst : boolean, bMultiple : boolean, bShallow : boolean, bIncludeSelf : boolean) Finds all DOM nodes descending from this DOM node that pass the given test function. |
| jsx3.app.Model | getAncestorOfName(strName : String) Returns the first ancestor with the given name. |
| jsx3.app.Model | getAncestorOfType(strType : String | Function | jsx3.lang.Class) Returns the first ancestor of the given type. |
| jsx3.app.Model | Returns the child DOM node of this node at the given index or with the given name. |
| int | Returns the zero-based index for this DOM node in relation to its siblings. |
| Array<jsx3.app.Model> | Returns an array containing all the child DOM nodes of this object. |
| jsx3.app.Model | Finds the first descendant of this DOM node with a the given name. |
| Array<jsx3.app.Model> | Finds all descendants of the given type. |
| String | getDynamicProperty(strName : String) Returns the value of the dynamic property @strPropName; if not found, returns null |
| jsx3.app.Model | Returns the first child. |
| jsx3.app.Model | Finds the first child of the given type. |
| String | Returns the help ID of this object. |
| String | getId() Returns the custom JSX-generated id for the object (i.e. |
| jsx3.app.Model | Returns the last child. |
| int | Returns the load type of this DOM node and the descending branch. |
| String | getMetaValue(strKey : String) Returns one of the meta data values stored at the top of the serialization file that this object was loaded from. |
| String | getNS() Returns the namespace that distinguishes this object's server (owner) from other server instances. |
| String | getName() Returns the custom developer-defined name of this object. |
| jsx3.app.Model | Returns the next sibling. |
| jsx3.app.Model | Returns the parent DOM node of this object. |
| int | Returns the persistence bit for this model object. |
| jsx3.app.Model | Returns the previous sibling. |
| jsx3.app.Server | Returns an object reference to the server that owns this object. |
| jsx3.net.URIResolver | Returns the URI resolver for this DOM node. |
| static String | Deprecated. |
| boolean | Assigns objMoveChild as the previousSibling of objPrecedeChild |
| jsx3.app.Model | Deserializes a JSX serialization file and appends the deserialized objects as children of this DOM node. |
| jsx3.app.Model | loadAndCache(strURL : String | jsx3.net.URI, bRepaint : boolean, objCache : jsx3.app.Cache, objResolver : jsx3.net.URIResolver) Loads a component file and caches the document in an XML cache. |
| jsx3.app.Model | loadXML(strXML : String | jsx3.xml.Document, bRepaint : boolean, objResolver : jsx3.net.URIResolver) Deserializes a JSX serialization file and appends the deserialized objects as children of this DOM node. |
| protected void | Called during deserialization of this object. |
| protected void | Called during deserialization of this object. |
| protected void | Called during deserialization of this object. |
| protected void | Called when the server owning this DOM node changes. |
| void | onChildAdded(objChild : jsx3.gui.Model) Hook that notifies the model object that a child has been added to it. |
| protected void | onDestroy(objParent : jsx3.app.Model) The finalizer method. |
| protected void | Hook that notifies this model object that one of its children has been removed. |
| protected boolean | onSetChild(objChild : ?) Hook that allows for a prospective parent DOM node to veto the adoption of a child. |
| protected boolean | onSetParent(objParent : ?) Hook that allows for a prospective child DOM node to veto its adoption by a parent. |
| jsx3.app.Model | removeChild(vntItem : int | jsx3.app.Model) Removes a DOM child from this object. |
| jsx3.app.Model | removeChildren(arrChildren : Array<int | jsx3.app.Model>) Removes some or all children of this object. |
| Array<jsx3.app.Model> | jsx3.app.Model | Select objects from the DOM using a CSS3-like selection syntax. |
| jsx3.app.Model | boolean | setChild(objChild : jsx3.app.Model, intPersist : int, strSourceURL : String | jsx3.net.URI, strNS : String) Appends a child DOM node to this parent DOM node. |
| jsx3.gui.Painted | Assigns a dynamic property to one of this object's instance properties. |
| void | Sets the help ID of this object. |
| void | setLoadType(intLoadType : int) Sets the load type of this DOM node and the descending branch. |
| void | setS one of the meta data values stored at the top of a component's serialization file. |
| void | Sets the custom developer-defined name of this object. |
| jsx3.app.Model | setPersistence(intPersist : int) Sets the persistence bit for this model object. |
| String | toString() Returns a string representation of this object. |
| String | Returns this object serialized as XML by calling toString() on the result of toXMLDoc()
called on this object. |
| jsx3.xml.Document | Serializes this object as an XML document. |
| jsx3.xml.Entity | Serializes this object as an XML node in the XML document objXML. |
| Methods Inherited From jsx3.util.EventDispatcher |
|---|
| publish, subscribe, unsubscribe, unsubscribeAll |
| Methods Inherited From jsx3.lang.Object |
|---|
| clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf |
| Field Detail |
|---|
| Constructor Detail |
|---|
| Method Detail |
|---|
setChild() should be used instead of this method.true or null, the object being adopted will be added to
the parent's view via the parent's paintChild() method.
This parameter is made available for those situations where a loop is executing and multiple
objects are being adopted. As view operations are the most CPU intensive, passing false
while looping through a collection of child objects to adopt will improve performance. After the
last child is adopted, simply call repaint() on the parent to immediately synchronize the view.onSetChild() and onSetParent() will still be called)toXMLElm() to control their own serialized form.
When this method is called this object has already been instantiated but none of its properties have been set.
This method sets all of its properties. Any children of this object are automatically deserialized after this
method returns. true to deserialize any child objects or false to ignore them
(for example if this method performs a custom child deserialization). 0 for insert as the last child of the parent of this object and paint,
1 for insert as the last child of this parent of this object and do not paint, or 2
for load as a fragment.jsx3.app.Model parameter and returns
true if the node matches.true, include this object in the searchjsx3.app.Model parameter and returns
true if the node matches.true, return an array of matches, otherwise just the first match.true, only search direct children.true, include this node in the search.null if none found.
jsx3.Class instance.null if none found.
null if no such
child exists.
-1 if this object does not have a parent.
true, only search the children of this DOM node.null if none found.
jsx3.Class instance.true, only search direct children, not all descendants.jsx3.Class instance.true then only return objects whose class is exactly strType
(rather than returning subclasses too).null if none found.
LT_NORMAL, LT_SLEEP_PAINT, LT_SLEEP_DESER,
LT_SLEEP_PD, LT_SHOW_PAINT, or LT_SHOW_DESER. META_FIELDS.PERSISTNONE, PERSISTEMBED, PERSISTREF,
PERSISTREFASYNC. null if this
object is part of a DOM fragment. Until an object is added to a DOM tree by passing it as the parameter to
setChild(), the object will be a DOM fragment.false the repaint will be suppressed (useful for multiple obejct updates
that would lead to unnecessary updates to the VIEW)objResolver, if provided, or the URI resolver of this DOM node.true or null the deserialized objects will be
added to the parent's view via the parent object's paintChild() method.strURL is resolved
relative to it. Additionally, this resolver is stored as the URI resolver for this DOM node and its descendants.strURL is not the URL of a valid XML document.load() when the same URL will be loaded multiple
times in one application.objResolver, if provided, or the URI resolver of this DOM node.true or null the deserialized objects will be
added to the parent's view via the parent object's paintChild() method.strURL is resolved
relative to it. Additionally, this resolver is stored as the URI resolver for this DOM node and its descendants.strURL is not the URL of a valid XML document.
true or null the deserialized objects will be
added to the parent's view via the parent object's paintChild() method.strXML is not a valid XML document.
getParent(), getServer(), getXML(), etc. return null.init() is not called. Called after this object has been
instantiated and after it has been attached to the DOM. Methods overriding this method should usually begin
with a call to jsxsuper().
When a new branch is attached to the DOM, this method is executed on each node in the branch. The order is
reverse-breadth-first meaning that child nodes are notified from oldest to youngest and before the parent node.
This implementation of this method executes the on-after-deserialize script of this object.getParent(), getServer(), getXML(), etc. return null.jsxsuper().
Note that this method is called after this object has been removed from the DOM tree. Therefore
this.getParent() and this.getServer() will return null. Use the
objParent parameter for access to the DOM tree.this.getChildren() does not contain objChild)
and after the child has been removed from the view (objChild.getRendered() is also null).
This method is only called if the child is being removed from the DOM but this object (the parent) is not
being removed. Therefore, this hook cannot be relied upon for garbage collection.
If removeChildren() is called on this object, this hook is called exactly once after all children
have been removed. In that case, the first parameter to this method will be the array of children and the
second parameter will be null.
In general a method overriding this method should begin by calling jsxsuper.onSetChild() method.adoptChild() should be used instead of this
method.jsx3_gui_ClassName - matches objects by their exact class. Replace "." with "_" in the selector.* - matches any object#id - matches objects whose name equals id
.class-name - matches objects for which getClassName() is defined and returns a
string that contains the token class-name
:first and :last - matches objects that are their parents' first and last children:nth(n) and nth-child(n) - matches objects whose child index is equal to n
:instanceof(ClassName) - matches objects that are instances of the class or interface ClassName
[prop="value"] and [prop*="value"] - matches objects whose value for field
prop equals value
value. The quotes around value are optional.
[getter()="value"] and [getter()*="value"] - matches objects whose return value for
method getter equals value
value. The quotes around value are optional.
AB - matches objects that match both A and BA B - matches descendants of objects matching A that match BA > B - matches immediate children of objects matching A that match Btrue, return only the first match.strExpr is an invalid selection query.adoptChild()
should be used instead to ensure that the child is removed from its current parent.intPersist is PERSISTREF or PERSISTREFASYNC.strNS parameter is not specified.false if the set was vetoed true, this dynamic property will not be serialized with the object.LT_NORMAL, LT_SLEEP_PAINT, LT_SLEEP_DESER,
LT_SLEEP_PD, LT_SHOW_PAINT, or LT_SHOW_DESER.META_FIELDSPERSISTNONE, PERSISTEMBED, PERSISTREF,
PERSISTREFASYNC.toString() on the result of toXMLDoc()
called on this object.toXMLDoc() for a description.objProperties parameter may include the following keys:
onAfterDeserialize elementonBeforeDeserialize elementname elementicon elementdescription elementtrue the children of this object, rather than this object, are
serializedtrue all descendants with persistence PERSISTNONE are included in the
serializationobjXML. This method can be
overridden by subclasses of Model that want to provide their own serialized form. However,
this method should at least return the node <object type="pkg.Class"/> in order to be compatible with
deserialization. toXMLDoc().