/*package*/ void setRendered(boolean rendered) { if (_rendered != rendered) { _rendered = rendered; smartUpdate("_loaded", _rendered); } }
/** * Sets whether all children of this tree item, if any, is loaded. * @since 3.0.0 */ /*package*/ void setLoaded(boolean loaded) { if (_loaded != loaded) { _loaded = loaded; smartUpdate("_loadedChildren", _loaded); } }
/** * Sets whether it is disabled. * @since 3.0.1 */ public void setDisabled(boolean disabled) { if (_disabled != disabled) { _disabled = disabled; smartUpdate("disabled", disabled); } }
/** Sets whether it is selectable. * * <p>If the listbox is in a checkmark mode, the selectable state will affect * the checkable icon to display or not.</p> * <p>Default: true.</p> * @param selectable */ public void setSelectable(boolean selectable) { if (_selectable != selectable) { _selectable = selectable; // non-checkable cannot be selected if (!_selectable) setSelected(false); smartUpdate("selectable", selectable); } }
/** Sets whether this container is open. */ public void setOpen(boolean open) { if (_open != open) { _open = open; //Note: _treerow might not be ready yet because it might be //initialized before creating child components (for ZK pages) smartUpdate("open", _open); //If the item is open, its tree has model and not rendered, render the item if (_treechildren != null) addVisibleItemCount((_open ? 1 : -1) * _treechildren.getVisibleItemCount()); Tree tree = getTree(); if (tree != null && tree.getModel() != null) { if (_open && !isLoaded()) tree.renderItem(this); } } }
public boolean setVisible(boolean visible) { if (isVisible() != visible) { smartUpdate("visible", visible); int count = isOpen() && _treechildren != null ? _treechildren.getVisibleItemCount() + 1 : 1; if (visible) { boolean result = super.setVisible(visible); addVisibleItemCount(count); return result; } else { addVisibleItemCount(-count); return super.setVisible(visible); } } return visible; }