[fusion-commits] r1976 - sandbox/jxlib-3.0/lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon Nov 16 15:09:36 EST 2009
Author: pagameba
Date: 2009-11-16 15:09:34 -0500 (Mon, 16 Nov 2009)
New Revision: 1976
Modified:
sandbox/jxlib-3.0/lib/jxlib.uncompressed.js
Log:
updating to latest jxlib build.
Modified: sandbox/jxlib-3.0/lib/jxlib.uncompressed.js
===================================================================
--- sandbox/jxlib-3.0/lib/jxlib.uncompressed.js 2009-11-16 03:30:54 UTC (rev 1975)
+++ sandbox/jxlib-3.0/lib/jxlib.uncompressed.js 2009-11-16 20:09:34 UTC (rev 1976)
@@ -15706,10 +15706,11 @@
* of this list.
*/
remove: function(item) {
- if (this.container.hasChild(item)) {
- this.unselect(item, true);
- document.id(item).dispose();
- var target = item.retrieve('jxListTarget') || item;
+ var el = document.id(item);
+ if (el && this.container.hasChild(el)) {
+ this.unselect(el, true);
+ el.dispose();
+ var target = el.retrieve('jxListTarget') || el;
target.removeEvents(this.bound);
this.fireEvent('remove', item, this);
return item;
@@ -19165,7 +19166,7 @@
this.swatch.setStyles(styles);
}
});
-// $Id: menu.js 602 2009-11-10 19:41:36Z pagameba $
+// $Id: menu.js 606 2009-11-11 15:22:37Z pagameba $
/**
* Class: Jx.Menu
*
@@ -28605,23 +28606,49 @@
Family: 'Jx.Tree',
Extends: Jx.Widget,
parameters: ['options','container', 'selection'],
+ /**
+ * APIProperty: selection
+ * {<Jx.Selection>} the selection object for this tree.
+ */
selection: null,
+ /**
+ * Property: ownsSelection
+ * {Boolean} indicates if this object created the <Jx.Selection> object
+ * or not. If true then the selection object will be destroyed when the
+ * tree is destroyed, otherwise the selection object will not be
+ * destroyed.
+ */
ownsSelection: false,
- isOpen: true,
+ /**
+ * Property: list
+ * {<Jx.List>} the list object is used to manage the DOM elements of the
+ * items added to the tree.
+ */
list: null,
+ /**
+ * APIProperty: domObj
+ * {HTMLElement} the DOM element that contains the visual representation
+ * of the tree.
+ */
domObj: null,
options: {
- /* APIProperty: select
+ /**
+ * Option: select
* {Boolean} are items in the tree selectable? See <Jx.Selection>
* for other options relating to selections that can be set here.
*/
select: true,
template: '<ul class="jxTreeRoot"></ul>'
},
+ /**
+ * APIProperty: classes
+ * {Hash} a hash of property to CSS class names for extracting references
+ * to DOM elements from the supplied templates.
+ */
classes: new Hash({domObj: 'jxTreeRoot'}),
/**
* APIMethod: render
- * Create a new instance of Jx.Tree
+ * Render the Jx.Tree.
*/
render: function() {
this.parent();
@@ -28665,6 +28692,19 @@
}
},
+ /**
+ * APIMethod: add
+ * add one or more items to the tree at a particular position in the tree
+ *
+ * Parameters:
+ * item - {<Jx.TreeItem>} or an array of items to be added
+ * position - {mixed} optional location to add the items. By default,
+ * this is 'bottom' meaning the items are added at the end of the list.
+ * See <Jx.List::add> for options
+ *
+ * Returns:
+ * {<Jx.Tree>} a reference to this object for chaining calls
+ */
add: function(item, position) {
if ($type(item) == 'array') {
item.each(function(what){ this.add(what, position); }.bind(this) );
@@ -28680,6 +28720,16 @@
this.list.add(item, position);
return this;
},
+ /**
+ * APIMethod: remove
+ * remove an item from the tree
+ *
+ * Parameters:
+ * item - {<Jx.TreeItem>} the tree item to remove
+ *
+ * Returns:
+ * {<Jx.Tree>} a reference to this object for chaining calls
+ */
remove: function(item) {
item.removeEvents('add');
item.removeEvents('remove');
@@ -28689,6 +28739,17 @@
item.setSelection(null);
return this;
},
+ /**
+ * APIMethod: replace
+ * replaces one item with another
+ *
+ * Parameters:
+ * item - {<Jx.TreeItem>} the tree item to remove
+ * withItem - {<Jx.TreeItem>} the tree item to insert
+ *
+ * Returns:
+ * {<Jx.Tree>} a reference to this object for chaining calls
+ */
replace: function(item, withItem) {
item.owner = null;
withItem.owner = this;
@@ -28750,7 +28811,7 @@
});
},
/**
- * APIMethod:
+ * APIMethod: empty
* recursively empty this tree and any folders in it
*/
empty: function() {
@@ -28761,11 +28822,11 @@
if (item.retrieve('jxTreeItem')) {
this.remove(item.retrieve('jxTreeItem'));
}
- });
+ }, this);
},
/**
- * Method: findChild
+ * APIMethod: findChild
* Get a reference to a child node by recursively searching the tree
*
* Parameters:
@@ -28798,6 +28859,15 @@
});
return result;
},
+ /**
+ * Method: setSelection
+ * sets the <Jx.Selection> object to be used by this tree. Used primarily
+ * by <Jx.TreeFolder> to propogate a single selection object throughout a
+ * tree.
+ *
+ * Parameters:
+ * selection - {<Jx.Selection>} the new selection object to use
+ */
setSelection: function(selection) {
if (this.selection && this.ownsSelection) {
this.selection.removeEvents(this.bound);
@@ -28808,7 +28878,7 @@
this.list.setSelection(selection);
this.list.each(function(item) {
item.retrieve('jxTreeItem').setSelection(selection);
- })
+ });
}
});
More information about the fusion-commits
mailing list