Expand (or collapse) all parent nodes.

This convenience method uses `tree.visit()` and `tree.setExpanded()`
internally.

@param {boolean} [flag=true] pass false to collapse
@param {object} [opts] passed to setExpanded()
@since 2.30
775373
function(flag, opts) {
			flag = flag !== false;
			this.visit(function(node) {
				if (
					node.hasChildren() !== false &&
					node.isExpanded() !== flag
				) {
					node.setExpanded(flag, opts);
				}
			});
		}
662278
function expandToItem(treeId,itemId) {
	var ul = document.getElementById(treeId);
	if (ul == null) { return false; }
	var ret = expandCollapseList(ul,nodeOpenClass,itemId);
	if (ret) {
		var o = document.getElementById(itemId);
		if (o.scrollIntoView) {
			o.scrollIntoView(false);
		}
	}
}
712656
function selectNext() {
    this.index = ( this.index + 1 ) % this.items.length;
    if ( this.expanded ) {
        collapse.call( this );
        expand.call( this, false );
    }
}
935430
function(opts) {
  var that = this;

  this._children = {};
  var label = $.div( 'label' );
  var button = $.div( 'button', 'thm-bgP', [new Icon({content: 'tri-down', size: '24px'})] );
  var body = $.tag( 'div', 'body' );
  var datalist = $.div( 'datalist' );
  this._button = button;
  var table = $.div('table', 'thm-ele2', 'thm-bg3', [body, button]);
  var elem = $.elem( this, 'div', 'wdg-combo',
                     [label, table, datalist] );
  var touchable = new Touchable( elem );

  body.addEventListener('focus', function() {
    $.removeClass( table, 'thm-ele2' );
    $.addClass( table, 'thm-ele4' );
  });
  body.addEventListener('blur', function() {
    $.addClass( table, 'thm-ele2' );
    $.removeClass( table, 'thm-ele4' );
  });
  DB.propRemoveClass(this, 'enabled', 'disabled');
  DB.propBoolean(this, 'focus')(function(v) {
    if (v) body.focus();
    else body.blur();
  });
  DB.propString(this, 'label')(function(v) {
    if (v === null || (typeof v === 'string' && v.trim() == '')) {
      $.addClass(elem, 'no-label');
    } else {
      $.removeClass(elem, 'no-label');
      $.textOrHtml(label, v);
      if (v.substr(0, 6) == '<html>') {
        $.att(label, {title: ''});
      } else {
        $.att(label, {title: v});
      }
    }
  });
  DB.prop(this, 'content')(function(v) {
    var obj;
    if( typeof v === 'string' ) {
      v = v.split(",").map(function(itm) {
        return itm.trim();
      });
      obj = {};
      v.forEach( function( itm ){
        obj[itm] = itm;
      });
      v = obj;
    }
    if (Array.isArray( v )) {
      // Convert array into map.
      // Each item must have the `$key` property.
      // If not, the element is ignored.
      obj = {};
      v.forEach(function (itm, idx) {
        if( typeof itm.$key === 'undefined' ) return;
        obj[itm.$key] = itm;
      });
      v = obj;
    }
    that._children = v;
    DB.fire( that, 'value' );
  });
  DB.propString(this, 'value')(function(v) {
    var selectedItem = that._children[v];
    if( typeof selectedItem === 'undefined' ) {
      for( v in that._children ) break;
      selectedItem = that._children[v];
    }
    $.clear( body );
    if (!selectedItem) return;
    $.add( body, selectedItem );
  });
  DB.propAddClass(this, 'wide');
  DB.propRemoveClass(this, 'visible', 'hide');

  opts = DB.extend({
    value: '',
    content: [],
    label: null,
    enabled: true,
    wide: false,
    visible: true
  }, opts, this);

  touchable.tap.add( that.fire.bind( that ) );
}
661353
function(opts) {
  if(!opts) opts = {};
  var libpath = opts['path'];

  this._emitter = new events.EventEmitter();
  this._library = this.createLibrary(libpath);
  this._initCrypto(opts);
  this._options = this._createToxOptions(opts);
  this._initNew(this._options);
  this._initCallbacks();

  // Create a child ToxOld if specified for old groupchat functionality
  if(opts.old === true) {
    this._toxold = new ToxOld({ path: libpath, tox: this });
  }
}
183432
function collapse(d) {
    if (d.children) {
      d._children = d.children;
      d._children.forEach(collapse);
      d.children = null;
    }
  }
522358
function(ctx, callOpts) {
				// TODO: return promise?
				var ac,
					i,
					l,
					node = ctx.node;

				if (node.parent) {
					ac = node.parent.children;
					for (i = 0, l = ac.length; i < l; i++) {
						if (ac[i] !== node && ac[i].expanded) {
							this._callHook(
								"nodeSetExpanded",
								ac[i],
								false,
								callOpts
							);
						}
					}
				}
			}
1139170
public static void expandAll(JTree tree, TreePath path, boolean expand)
	{
		TreeNode node = (TreeNode)path.getLastPathComponent();

		if (node.getChildCount() >= 0)
		{
			Enumeration<?> enumeration = node.children();
			while (enumeration.hasMoreElements())
			{
				TreeNode n = (TreeNode)enumeration.nextElement();
				TreePath p = path.pathByAddingChild(n);

				expandAll(tree, p, expand);
			}
		}

		if (expand)
		{
			tree.expandPath(path);
		}
		else
		{
			tree.collapsePath(path);
		}
	}
281516
function (opt) {
        intervalScaleProto.niceExtent.call(this, opt);

        var originalScale = this._originalScale;
        originalScale.__fixMin = opt.fixMin;
        originalScale.__fixMax = opt.fixMax;
    }
1127728
function(callOpts) {
			var opts = this.tree.options;

			//		this.debug("fixSelection3FromEndNodes()");
			_assert(opts.selectMode === 3, "expected selectMode 3");

			// Visit all end nodes and adjust their parent's `selected` and `partsel`
			// attributes. Return selection state true, false, or undefined.
			function _walk(node) {
				var i,
					l,
					child,
					s,
					state,
					allSelected,
					someSelected,
					unselIgnore,
					unselState,
					children = node.children;

				if (children && children.length) {
					// check all children recursively
					allSelected = true;
					someSelected = false;

					for (i = 0, l = children.length; i < l; i++) {
						child = children[i];
						// the selection state of a node is not relevant; we need the end-nodes
						s = _walk(child);
						// if( !child.unselectableIgnore ) {
						unselIgnore = FT.evalOption(
							"unselectableIgnore",
							child,
							child,
							opts,
							false
						);
						if (!unselIgnore) {
							if (s !== false) {
								someSelected = true;
							}
							if (s !== true) {
								allSelected = false;
							}
						}
					}
					state = allSelected
						? true
						: someSelected
							? undefined
							: false;
				} else {
					// This is an end-node: simply report the status
					unselState = FT.evalOption(
						"unselectableStatus",
						node,
						node,
						opts,
						undefined
					);
					state = unselState == null ? !!node.selected : !!unselState;
				}
				node._changeSelectStatusAttrs(state);
				return state;
			}
			_walk(this);

			// Update parent's state
			this.visitParents(function(node) {
				var i,
					l,
					child,
					state,
					unselIgnore,
					unselState,
					children = node.children,
					allSelected = true,
					someSelected = false;

				for (i = 0, l = children.length; i < l; i++) {
					child = children[i];
					unselIgnore = FT.evalOption(
						"unselectableIgnore",
						child,
						child,
						opts,
						false
					);
					if (!unselIgnore) {
						unselState = FT.evalOption(
							"unselectableStatus",
							child,
							child,
							opts,
							undefined
						);
						state =
							unselState == null
								? !!child.selected
								: !!unselState;
						// When fixing the parents, we trust the sibling status (i.e.
						// we don't recurse)
						if (state || child.partsel) {
							someSelected = true;
						}
						if (!state) {
							allSelected = false;
						}
					}
				}
				state = allSelected ? true : someSelected ? undefined : false;
				node._changeSelectStatusAttrs(state);
			});
		}
644579
function(e, params) {
      Event.stopEvent(e);
      var tgt = Event.getTarget(e);
      
      if( Dom.hasClass(tgt, 'expanded') || Dom.hasClass(tgt, 'collapsed') ) {
         this.expandElement(tgt);
      }
   }
210297
@UiThread
    protected void collapseView() {
        setExpanded(false);
        onExpansionToggled(true);

        if (mParentViewHolderExpandCollapseListener != null) {
            mParentViewHolderExpandCollapseListener.onParentCollapsed(getAdapterPosition());
        }
    }
533625
function(ctx, flag, callOpts) {
			var tree = ctx.tree,
				node = ctx.node;
			// Let the base implementation expand/collapse the node, then redraw the title
			// after the animation has finished
			return this._superApply(arguments).always(function() {
				tree.nodeRenderTitle(ctx);
			});
		}
465897
function(li) {
      
      var isExpanded = Dom.hasClass(li, 'expanded');
      Dom.replaceClass(li, isExpanded ? 'expanded' : 'collapsed' , isExpanded ? 'collapsed':'expanded');

      var h = this.hash[li.id];

      if(isExpanded) {
         // hide the sub-branch
         h.expanded.style.display = 'none';
      }
      else {
         if(h.expanded === false) {
            // generate the sub-branch
            h.expanded = this.buildBranch(h.value, li);
         }
         // show the sub-branch
         h.expanded.style.display = '';
      }
   }
89677
function (root, expandStack, applyFishEyeViewToEachNode) {
    if (root._private.data.collapsedChildren != null) {
      expandStack.push(root);
      this.expandNode(root, applyFishEyeViewToEachNode);
    }
    var children = root.children();
    for (var i = 0; i < children.length; i++) {
      var node = children[i];
      this.expandAllTopDown(node, expandStack, applyFishEyeViewToEachNode);
    }
  }
1069860
function(opts) {
			opts = $.extend({}, this.defaults, opts);

			if (this.overlay) {
				this.close();
			}

			this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( F.coming ? F.coming.parent : opts.parent );
			this.fixed   = false;

			if (opts.fixed && F.defaults.fixed) {
				this.overlay.addClass('fancybox-overlay-fixed');

				this.fixed = true;
			}
		}
362439
function(ctx, flag, callOpts) {
				var targetNode;

				flag = flag !== false;

				// this.debug("treeSetFocus(" + flag + "), callOpts: ", callOpts, this.hasFocus());
				// this.debug("    focusNode: " + this.focusNode);
				// this.debug("    activeNode: " + this.activeNode);
				if (flag !== this.hasFocus()) {
					this._hasFocus = flag;
					if (!flag && this.focusNode) {
						// Node also looses focus if widget blurs
						this.focusNode.setFocus(false);
					} else if (flag && (!callOpts || !callOpts.calledByNode)) {
						$(this.$container).focus();
					}
					this.$container.toggleClass("fancytree-treefocus", flag);
					this._triggerTreeEvent(flag ? "focusTree" : "blurTree");
					if (flag && !this.activeNode) {
						// #712: Use last mousedowned node ('click' event fires after focusin)
						targetNode =
							this._lastMousedownNode || this.getFirstChild();
						targetNode && targetNode.setFocus();
					}
				}
			}