/** * Sets the sort column state. If set to true, the column is sorted and designated as the * current sort column. * * @param sortColumn If true, this column is sorted and designated as the current sort column. * @param notifyParent If true, update the sort column property of the parent. */ protected void _setSortColumn(boolean sortColumn, boolean notifyParent) { if (propertyChange("sortColumn", this.sortColumn, this.sortColumn = sortColumn, false)) { if (sortColumn) { sort(); } else { updateClient(); } if (notifyParent) { Columns parent = (Columns) getParent(); if (parent != null) { if (sortColumn) { parent.setSortColumn(this); } else if (parent.getSortColumn() == this) { parent.setSortColumn(null); } } } } }